Skip to content

Error message from field on a manual location? #1884

Answered by engram-design
Tim-Wils asked this question in Ideas
Discussion options

You must be logged in to vote

Gotcha, makes sense!

The client-side validator (bouncer.js) doesn't have a collection of errors. But are you calling that validation on-demand like:

const invalidFields = formEl.form.formTheme.validator.validateAll($form);

or similar? If so, this returns the invalid fields. Anything more than that and we'd need to alter the validator behaviour to accommodate for this. In Formie 3 validator.getErrors() is possible.

Using submission.getErrors() is only going to work in Twig, which isn't going to be applicable here for your use case.

You almost don't need a custom field - you could use another Hidden field, or even a cosmetic field (Heading, Section, etc) and just include JS to render conten…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Tim-Wils
Comment options

@engram-design
Comment options

Answer selected by Tim-Wils
@Tim-Wils
Comment options

@engram-design
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants