Get ready for BLACK FRIDAY shopping starting in

App Connect Form Validator Support Product Page

Remove Validation if DIV Not Shown

Reported 06 Oct 2018 17:53:10
1
has this problem
06 Oct 2018 17:53:10 Michael Zucker posted:
I am using the the DMXZone 'Show' functionality to show or hide an entire DIV that contains form fields. If the user clicks a check box the div appears, and if they unblock it, it goes away. Obviously I need these form fields validated, however only when the checkmark is set to show the DIV.

How do I remove validation if the user does not check the box, and apply validation when the fields are visible to the user?

Replies

Replied 08 Oct 2018 20:04:36
08 Oct 2018 20:04:36 Teodor Kuduschiev replied:
Hi Michael,
What validation rules(s) are you using for this field?
Replied 08 Oct 2018 21:26:21
08 Oct 2018 21:26:21 Michael Zucker replied:
So I have about 8 fields all with different validations, however “required” is on for all of them.

I am using the ‘show’ attribute for the DIV. When the user clicks a checkbox, the DIV is shown and validation should take place.

When the checkbox is not checked, the DIV is hidden, and validation should not be run in Jesse to successfully submit the form.

Any thoughts on how i can remove validation if the user does NOT check the box?
Replied 09 Oct 2018 08:03:48
09 Oct 2018 08:03:48 Teodor Kuduschiev replied:
Please try binding the required validation like:

dmx-bind:required="value" where value is the same used for the "show" attribute.
Replied 09 Oct 2018 10:50:56
09 Oct 2018 10:50:56 Michael Zucker replied:
Thanks for the reply. Can you give me a quick example of what this would look like?
Replied 09 Oct 2018 10:53:56
09 Oct 2018 10:53:56 Teodor Kuduschiev replied:
Hello Michael,
I already did:


Quotedmx-bind:required="value" where value is the same used for the "show" attribute.

Reply to this topic