Copy link to clipboard
Copied
I have two fields on a form, we'll say A and B, and need to require that either A or B is filled out (but not necessarily both). So essentially, like a radio button, but for text fields. Any suggestions?
Copy link to clipboard
Copied
OK. Here's how I would do it. Define both fields as required and then use the following custom validation script in each one:
this.getField("Name of other field").required = (event.value=="");
event.target.required = true;
Copy link to clipboard
Copied
"Require" in what sense, exactly?
Copy link to clipboard
Copied
The same way that you can make a single field "required," I'd like to apply that to two fields but just require that one or the other is completed. It's actually for a W-4 that we're having new hires at our company complete, and we need to ensure that they either put in a withholding amount OR they complete the "Exempt" box.
Copy link to clipboard
Copied
OK. Here's how I would do it. Define both fields as required and then use the following custom validation script in each one:
this.getField("Name of other field").required = (event.value=="");
event.target.required = true;
Copy link to clipboard
Copied
Thank you!
Copy link to clipboard
Copied
Hello! Where do you type the validation in?
Copy link to clipboard
Copied
Hi! I'm trying to use this formula but getting the error message "Invalid forumla expression. [Cursor Position 5]:
unknown function "."
Do you mind helping me figure out how to input the formula correctly?
Copy link to clipboard
Copied
Hi! I'm trying to use this formula but getting the error message "Invalid forumla expression. [Cursor Position 5]:
unknown function "."
Do you mind helping me figure out how to input the formula correctly?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now