Hi,
I want to create a submit button by default disabled and also control with a checkbox. if I click on the checkbox then the button should be enabled otherwise show disabled.
here is my code:
$mform->addElement('advcheckbox', 'checkbox1', 'I have read all the above instruction and is ready to submit.', null, array(
'onClick'=>"enable();"));
$buttonarray[] = &$mform->createElement('submit', 'submitbutton', get_string('submit'),array('onClick'=>"return confirm('Are you sure you want to submit ');"));
Can anyone help me please?