pat-validation: Allow submission for formnovalidate buttons
Closed this issue · 3 comments
In Plone all action buttons are submit buttons, including the cancel button.
We're going to add a formnovalidate
attribute in plone.app.z3cform to those buttons which should skip the validation, like the cancel button, See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formnovalidate
We need to make sure that pat-validation
respects the formnovalidate attribute and allows the form to be submitted without validation.
I agree. There are cases where it might needed - for example if the cancel button modifies the server state. In Plone we have a locking mechanism - when someone edits a document the document is locked so that others cannot modify it. When hitting "cancel" the lock has to be released.
I think that is the reason why the cancel button is a submit button in default Plone.