Ticket #245 (closed task: fixed)

Opened 4 years ago

Last modified 3 years ago

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

diff.txt (869 bytes) - added by idbr 3 years ago.
Dialog removed, warning in kauri-role=messages

Change History

comment:1 Changed 4 years ago by karel

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)

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:4 Changed 3 years ago by jgou

  • Priority changed from minor to major

comment:5 Changed 3 years ago by mpo

  • Milestone changed from 0.4 to 0.4.1

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

comment:8 Changed 3 years ago by idbr

  • Status changed from new to closed
  • Resolution set to fixed

(In [1761]) Invalid form warning in element with kauri-role messages, instead of alert.
Fixes #245

Note: See TracTickets for help on using tickets.