Ticket #245 (closed task: fixed)
Invalid form submission -> "This is not a valid form"
| Reported by: | karel | Owned by: | mpo |
|---|---|---|---|
| Priority: | major | Milestone: | 0.4 |
| Component: | modules/kauri-forms | Version: | trunk |
| Keywords: | Cc: |
Description
When the user tries to submit an invalid form an alert box pops up saying "This is not a valid form\nSubmit canceled."
We should make it possible for the developer to provide another message and to present the message in some other way (e.g. toggle some form-level <div role="messages"/> or show a nice jquery dialog)
Attachments
Change History
comment:2 follow-ups: ↓ 6 ↓ 7 Changed 3 years ago by mpo
The invalid submit can be handled through the kauri-submit="invalid" attribute on the button you want to function as form-submit.
For the remainder of the issue I would just indeed remove the dialog and avoid the submit.
That and document this behaviour of course...
comment:3 Changed 3 years ago by freya
related: http://www.kauriproject.org/trac/ticket/197 (more ways to show validation result)
comment:6 in reply to: ↑ 2 Changed 3 years ago by jgou
- Milestone changed from 0.4.1 to 0.4
Seems better to include this in the 0.4 release.
Replying to mpo:
The invalid submit can be handled through the kauri-submit="invalid" attribute on the button you want to function as form-submit.
For the remainder of the issue I would just indeed remove the dialog and avoid the submit.
That and document this behaviour of course...
comment:7 in reply to: ↑ 2 Changed 3 years ago by idbr
While I'm looking at this issue I'm thinking that removing the dialog isn't a problem, but live enabling/disabling the submit button is not possible.
You can't be sure about the validity of the form until all form-elements are checked, so a user should focus every item once (even the fields that aren't required) before the submit-button becomes enabled.
Replying to mpo:
The invalid submit can be handled through the kauri-submit="invalid" attribute on the button you want to function as form-submit.
For the remainder of the issue I would just indeed remove the dialog and avoid the submit.
That and document this behaviour of course...
Changed 3 years ago by idbr
Dialog removed, warning in kauri-role=messages
Alternatively we can disable the 'submit' as long as the form is not valid.
(But the developer must be able to bypass this since it can be very interesting to submit anyway at development time)