Note: You should add a field to the database first if you want to save the entered field information.
- Open mod\your_mod\mod_form.php
- Add this line: $mform->addElement('text', 'your_field', 'label_shown', array('size'=>'64'));
- Done
Note2: your_field is the field name in the database of table mdl_your_mod, the field information will save to the table
Note3: To show the field, just use $your_mod->your_field
What can i do if I need List with my elements like in 'Format' ?
回覆刪除