Required filed in Email-based self registration form

Required filed in Email-based self registration form

by Noriko Shiina -
Number of replies: 1

Hi all,

I use Moodle 2.6.5 on Bluehost server.

How can I set City/town & Country as required filed in Email-based self registration?

I guessed it is Lock user filed (Site administration >> Plugins >> Authentication >> Email-based self-registration ) and changed value to "Locked". But it doesn't change.
Should I need to modify user/editlib.php?

Could anyone tell me the correct way please?


Average of ratings: -
In reply to Noriko Shiina

Re: Required filed in Email-based self registration form

by Frank B -

I think what you are looking to do is in /login/signup_form.php

on lines:


$mform->addElement('text', 'city', get_string('city'), 'maxlength="120" size="20"');

$mform->setType('city', PARAM_TEXT);

if (!empty($CFG->defaultcity)) {

$mform->setDefault('city', $CFG->defaultcity);

}

I've been looking for a way to make this required myself.