-
Sub-task
-
Resolution: Fixed
-
Major
-
1.8
-
None
-
MOODLE_18_STABLE
-
MOODLE_18_STABLE
The cancel button is not easy to create correctly. We should help developers to write forms with cancel buttons without ugly hacks that rely on JS and can not be used without it.
Solution:
1/ add cancel button element type
2/ add cancelled() method to moodleform class
expected use:
$mform = new someform();
if ($mform->cancelled()) {
redirect($somewhere);
} else if ($data = $mform->data_submitted()) {
...
}
- has been marked as being related by
-
MDL-17553 mform: unable to create Cancel button
- Closed