-
Bug
-
Resolution: Fixed
-
Minor
-
3.7.1, 3.8
-
MOODLE_37_STABLE, MOODLE_38_STABLE
-
MOODLE_37_STABLE
-
MDL-66106-master -
The ability to randomise element IDs was introduced, as an optional config for forms, in MDL-65217. That issue didn't make all required changes, resulting in JS errors when trying to validate a simple form with randomisation of element ids enabled. The result is that the form posts, when it should not.
I'll include a test script demonstrating the problem, which can also be used for testing the fix.
To replicate the bug:
1. Place 'testform.php' in your webroot and access it
2. Open browser dev tools -> console and make sure 'persist logs' is enabled (or equivalent). Leave the console open.
3. Submit the form empty
Expected: The form validation will catch the empty field and display a form error message without submitting anything (the field is set to use client validation after all)
Actual: Notice a JS error and that the page posts the form
- caused a regression
-
MDL-70987 Short form not expanded for errors on submission
-
- Closed
-
- Discovered while testing
-
MDL-63070 QuickForms library upgrade
-
- Closed
-
- is a regression caused by
-
MDL-65217 Conflict of element ids (html attribute "id") when there are several forms on one page
-
- Closed
-
- is duplicated by
-
MDL-65815 Javascript error when using random element ids
-
- Closed
-