The form I'm working on has a radio button group labeled "SeparateMailingAddress" with only 2 choices "Yes" or "No".
I also have 4 separate text fields related to that "SeparateMailingAddress" radio group field which are: "MailingStreet", "MailingCity", "MailingState", and "MailingZIP"
In the text field properites for the 4 text fields I marked them as required but applied the form fields to be hidden by default.
If a "No" choice is selected in the radio group I want the 4 text fields to become visible and required.
Conversly "Yes" would keep hidden or if user makes a mistake and wants to switch from "No" to "Yes" i'd like the visible text fields to return to hidden and no longer be required since those fields wouldn't apply based on switching back to that "Yes" choice.
I got things working for the most part using the basic functions in the Radio Button properties by adding an action and using the Show/hide a field option to hide for each radio button choice.
My issue now is even though the user filled in all the required fields, they are still getting a submit form error message that is saying "At least one required field was empty. Please fill in the required fields (highlighted) before continuing." which appears to be a result of the hidden text fields because even though they are conditional based on the "No" radio button response, they are still checked as required in the text field properties
Is there a simple way to allow or override where when a user hits the "Submit Form" button, those conditionally required hidden text fields mentioned will still push and submit the form? Or does this require a custom script?
Hope makes sense, added image for further context. Thanks!