I have the following, but I want ALL text inputs, which don’t contain the word “optional” in the hint, to be required to have something in the field.
Currently, a user could just enter the Last Name field and it will allow them to pass to the next page.
I understand the j loops through & when it gets the last input and it has text, then it qualifies the block requirements.
Am I missing a simple solution to requiring ALL which don’t have “optional” instead of just the last one?
I don’t want to do a count variable because then it would be required to be 2/3. I’d rather just ALL that aren’t optional must have some text.
You’re checking for the text input to be non-empty (not equal to “”). Instead, set a variable value to false before the loop starts and then check for the text input to be empty (=“”). If you find it’s empty, change the variable to true. Once the loop completes, if the variable is still false, the form is completed.