June 2017
Beginner to intermediate
368 pages
8h 31m
English
In Eclipse, create a new file called /mod_form.php. This will contain the form definition class, given in full in the following code:
class mod_wavefront_mod_form extends moodleform_mod{ public function definition() { global $CFG; $mform =& $this->_form; // General options. $mform->addElement('header', 'general', get_string('general', 'form')); $mform->addElement('text', 'name', get_string('name'), array('size' => '48', 'maxlength' => '255')); $mform->setType('name', PARAM_TEXT); $mform->addRule('name', null, 'required', null, 'client'); $mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client'); $this->standard_intro_elements(); // Advanced options. $mform->addElement('header', 'wavefrontoptions', ...Read now
Unlock full access