Problem/Motivation
Given that we have more than one ajaxified form in the same page, when the user submits one of then for the first time with validation erros, the "error" class is applied as expected. But if the other one is also submited with no errors, then the first one keeps the error classes.
I also noticed that the "error" class from checkboxes or radio button aren't removed when I perform the same test reported above.
See the screeshot for clarification.
Proposed resolution
- Move the ajax command that removes the error class to be performed before the form error validation check.
- Add a new ajax command that removes the error class from elements that have the ".form-checkboxes" or ".form-radios" classes.
Remaining tasks
None.
User interface changes
No UI changes.
API changes
No API changes.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | ajax_form_entity-form_validation_issues_multiple_forms-2365073-3.patch | 1.79 KB | revagomes |
| #1 | Third_form_success.png | 54.54 KB | revagomes |
| Second_form_error.png | 57.75 KB | revagomes | |
| First_form_error.png | 50.63 KB | revagomes |
Comments
Comment #1
revagomes commentedComment #2
revagomes commentedComment #3
revagomes commentedHere goes the patch!
Comment #5
eme commentedCommited. You're entirely right about checkboxes and radios. About removing errors from the other forms, I'm not quite sure as we're messing a bit from one form to another. The system was developed to be independant. For now I have commited the removing everywhere but it may be more consistent to be more specific and work only on the right form...