How to add custom fields in Course page

How to add custom fields in Course page

by srihari g -
Number of replies: 2

If any body knows about to add custom fields in course page.


for reference i am attaching the course page where i want to add custom fields.


i want to add some custom fields in general block in course page creation. Please Give me the response aswellas possible.

Attachment generalcourse.png
Average of ratings: -
In reply to srihari g

Re: How to add custom fields in Course page

by kanchan Paras -

I have added 7 custom check boxes on course edit_form.php. 

like this:

mform->addElement('advcheckbox', 'a1', 'College','', null, array(0, 1));

$mform->setDefault('a1', 0);

$mform->addElement('advcheckbox', 'a2', 'School','', null, array(0, 1));

$mform->setDefault('a2', 0);


and added 7 Bit data type fields to {course} table same as checkbox name (a1, a2, a3,...a7)


while updating data. the data is updating properly for first 3 fields only but the rest of 4 fields are not updating in data base. while i am adding value in db {coure} table it shows on page but any change on page is not updating in course table for last 4 fields.

please help? 

Thanks and Regards,