Hi moodlers,
How can I make some optional fields optional fields like : Institution, Mobile phone, Address display on signup page?
Also, is there a way to make date of birth appear in the signup page too ?
Thank you.
I am using moodle 3.1
Hello,
As far as I know, in standard Moodle it is only possible to make custom profile fields display on the signup page. Please see the documentation User profile fields for more details.
I already added some custom profile fields, but for day of birth for example, not only it is a repetition on the user profile (there is date of birth by default in the user profil) , the date type on custom fields contains hours and minutes , which is not suitable for my case.
Thank you,
Hi marwa, I also need to do this.
It's extrange how the profile fields function.
Custom profile fields
Optional profile fields
In my case, i need is to display que same fields in participants list and in the signup form... i think that without modifing the code it isn't possible.
Maybe somebody can help us.
Regards,
Hi Gonzalo,
I think Jon answered your second question
I tested the plugin and it works !
Excelent!
Another way to achive this is adding some code lines in login/signup.php, calling the optionals profile fields. Arround line 90 i try with this code and functions, but surely the plugin is the better solution.
mform->addElement('text', 'phone1', get_string('phone1'), 'maxlength="255" size="20"');
$mform->setType('phone1', PARAM_TEXT);
if (!empty($CFG->defaultcity)) {
$mform->setDefault('phone1', $CFG->defaultcity);
}
$mform->addElement('text', 'msn', get_string('msnid'), 'maxlength="120" size="20"');
$mform->setType('msn', PARAM_TEXT);
if (!empty($CFG->defaultcity)) {
$mform->setDefault('msn', $CFG->defaultcity);
}
$mform->addElement('text', 'institution', get_string('institution'), 'maxlength="255" size="20"');
$mform->setType('institution', PARAM_TEXT);
if (!empty($CFG->defaultcity)) {
$mform->setDefault('institution', $CFG->defaultcity);
}
$mform->addElement('text', 'department', get_string('department'), 'maxlength="255" size="20"');
$mform->setType('department', PARAM_TEXT);
if (!empty($CFG->defaultcity)) {
$mform->setDefault('department', $CFG->defaultcity);
}
Thanks!