Skip to content

Inline validation not working with easyform submit button #453

@Nimo-19

Description

@Nimo-19

The pat-validation normaly disables the submit button or checks if the form is valid if it is submitted.

But this is disabled, when the buttton has the formNoValidate attribute:

See patternslib validation.js#L408 and patternslib validation.js#L119

plone.app.z3cform puts the formNoValidation attribute on all buttons not named save or add
See plone.app.z3cform submit.py#L25

Sadly the easyform submit button is named: submit. With that name the formNoValidation is set and the pat-validation does not work as expected.
See collective.easyform view.py#L191

The simplest solution would be to name the button save or add.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions