Closed thet closed 2 years ago
A cancel button should in the vast majority of cases no be submit button.
Op 11 feb. 2022, om 09:28 heeft Johannes Raggam @.***> het volgende geschreven:
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 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.
— Reply to this email directly, view it on GitHub https://github.com/Patternslib/Patterns/issues/960, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFUKKIJWBKTULUK2OXOZMLU2TCCFANCNFSM5ODPWFRA. You are receiving this because you are subscribed to this thread.
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.
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-formnovalidateWe need to make sure that
pat-validation
respects the formnovalidate attribute and allows the form to be submitted without validation.