How do you make a text field required based on radio button values

S

SuzetteS

We are currently using InfoPath 2003.
My form contains 6 radio buttons (N/A, and 1-5) that cannot be blank, with a
default of N/A.
Each choice contains a value: N/A = 0, 1 = 1, etc.
If a user chooses 1-5, a text field appears for the user to justify their
selection.
How do I make the text field mandatory (cannot be blank) if the user chooses
1-5, and not mandatory if they leave it at N/A.

If I check the 'cannot be blank' box in the text field properties, then the
user who chooses N/A is required to fill in a field they can't see (since it
only appears if 1-5 is selected) and therefore cannot submit the form.
Basically I need to make the text field "cannot be blank" if buttons 1-5 are
selected, but "can be blank" if N/A button is selected.
 
S

Swathi

Hi,

Put a data validation on the text box with the following condition.
Field1 NOT EQUAL TO 0 and
Field1 IS NOT BLANK.

Here Field1 -> radio button.
Hope this helps you.
 
S

SuzetteS

Thank you!
I used the first part and modified the second to say
Text box IS BLANK
And it worked perfectly.
Sounds so easy - I just couldn't see it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top