I'd like to dynamically make several fields required based on where the form is in the process. I have an inclusive gateway that can route the form to three different groups, each of which will have their own required fields to fill out, so I'd like to make those fields required only when the form reaches that group.
So, for example:
Fields for Group A are only required when the task is "Group A task".
Fields for Group B are only required when the task is "Group B task".
etc.
Alternatively, I can make all of the necessary fields required, and hide them until the form reaches the appropriate group's task.
Is this possible with Javascript?
If so, can someone provide sample code?
thank you.