This forum post has been removed
Number of replies: 5Hello Rolf Petersen,
you
can try editing the the file in the
user/editlib.php approx line 383, on
// Moodle optional fields.
For example to make 'city number required' :
current its
$mform->addElement('text', 'city', get_string('phone1'), 'maxlength="20" size="25"');
Add:
$mform->addRule('city', $strrequired, 'required', null, 'client');
to look like:
$mform->addElement('text', 'city', get_string('phone1'), 'maxlength="20" size="25"');
$mform->addRule('city', $strrequired, 'required', null, 'client');
This forum post has been removed
Thinking a bit outside the square, and can't say I've tried it, but perhaps the associated field module (https://moodle.org/plugins/profilefield_associated) could get you the required result and wouldn't require hacking core (which as you alluded to is a bit of a pain when upgrading and should be avoided if possible).
This forum post has been removed
The associated field plugin helps you to make the institution field mandatory, but unfortunately you cannot do anything for the city and country.