I'm hoping someone may be able to help. I have a series of repeaters, which are being set to hidden (.hide()/.toggle()) through jQuery.
Because of this the fields are now longer validating within the hidden fields and are falling back to php validation.
I'm wondering if it's possible to manually trigger the validation one the 'add row' click, in order to alleviate this problem? This also creates a better use experience as well as validation occurs before creating the new row.
The form is setup to be non-Ajax, but javascript validation.
I suggest you look at this: https://formidable-masterminds.com/repeaters-and-complex-jquery-operations/
Adding and removing repeater rows is an Ajax function. If you want to trigger jQuery validation when an event fires, you have to tap into the Ajax event at the document level. The article explains how to gain access to the event and use it to manage the repeater.
Please login or Register to submit your answer