I'm completely new to this forum and do not know if this the right place to add this thread, anyways I'm currently working in Moodle 2.5 customizing the 'Create new account' form. I have managed to add the Enrolment key in the General field but once I try to create a user account for some reason it keeps telling me "missingenrolment key" and it won't let me continue. Wonder what am I doing wrong or what is it that i need to add or change?
This is the code I used in the login/signup_form.php
$mform->addElement('text', 'Enrolment key', get_string('Enrolment key','form'), 'required','maxlength="100" size = "25"');
$mform->setType('Enrolment key', PARAM_TEXT);
$mform->addRule('Enrolment key',get_string('missingenrolment key'), 'required', null, 'server');
We need the Enrolment key set in the 'add a new user' form because with the people we work we teach them how to use emails and well we do not want them to just create an account and access courses automatically.
Any ideas??? I'm almost pulling my hair do not know where to go to fix it.....Any help will definitely be appreciated
This topic is now closed. New replies are no longer allowed.