I've been developing a dynamic form wjich i've been working on for 7 weeks.
I've build mandatory and validation checks for the entire form. Its a for which kan collapse based on user actions.
As output this form gan generate more than 25 different versions.
Now my problem:
I'd like to run javascripts (mandatory checks) before the form is being saved by the user. Some fields and their subforms are not visible because the user which is filling out the form made choices which don't require those fields/sections of the form to be filled.
I scripted a function which checks all fields where i placed mandatory check.
But i want the function to only check the fields for mandatory if the parent subform is visible. Is this possible?
Now the user gets errors because not all required fields were filled out. But they actually are filled OK only the hidden sections have some mandatory fields which are not visible and therefore are not filled either.