General developer forum

setting a checkbox unchecked in a form

 
Picture of Dave Emsley
Re: setting a checkbox unchecked in a form
Particularly helpful Moodlers

You do need the advanced check box. 

Have a look at https://docs.moodle.org/dev/lib/formslib.php_Form_Definition#advcheckbox

In particular the part about the optional 6th parameter which indicates the default for checked or not.

Hope this helps.


Dave

 
Average of ratings: Useful (1)