Skip to content

Is it possible to disable front-end JS validation but still have recaptcha working? #2806

@bleepsandblops

Description

@bleepsandblops

Question

Hello,

I'm trying to use the browser's validation for required fields in a very basic form. I don't want to use the server-validation because I'm using the Ajax function and it's coming back as 500: Couldn’t save submission due to errors. and it doesn't look like I can modify that message to say fields are missing.

I tried checking "Output base javascript" and leaving "Output Theme" unchecked in the javascript options, and in this case the browser validation kicks in but then I get this error on submission, relating to the captcha:

Uncaught TypeError: Cannot read properties of null (reading 'value')
    at o.onValidate (recaptcha-v3.js?v=1776304629:1:3782)
    at v.validateCaptchas (formie.js?v=1776304629:1:38837)
    at formie.js?v=1776304629:1:38206

As a compromise, I would be happy if there was a way to customise that ajax error message when a form is submitted with empty fields.

Thank you!

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    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