Go to different form if checkbox is selected

Go to different form if checkbox is selected

by Benedetto Zambetti -
Number of replies: 0

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: -