How can I show a form section only when a validation error occurs?

Confluence User - 21 Jul, 2018

Hi, so I'm trying to put a hidden section in a form

And the section only shows in the form after a user inputs and submits invalid data and a validation error occurs

validation;error;show/hide;hide-section

1


22 Jul, 2018
confluenceUser
confluenceUser

I have done it using front-end Javascript.

Apparently, the form errors appear in elements with class "form-error-message"

The answer is to start the section hidden, and add a condition: if an element with class "form-error-message" exists, then show the section

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print