General developer forum

Go to different form if checkbox is selected

 
Picture of Benedetto Zambetti
Go to different form if checkbox is selected
 

Hi everybody! My problem is this.

I've added a checkbox in settings page of a plugin as follow as:

 $mform->addElement('advcheckbox', 'mybox', get_string('mybox', 'mod_mymod'));

 $mform->setDefault('mybox', false);

Now i want that if checkbox is "false", it save changes as normal, but if the checkbox is "true" it must redirect to another settings form. How can I do this?

 
Average of ratings: -