Is it possible to set a text field as required based on the input value from another field? I have a combo box that will allow users to select either Yes or No. If they select No, I would like to make a separate text field required for an explanation. I've looked at other info on this topic but can't seem to find an answer that fits my needs.
Also, an alternative solution would be to highlight the field that is required when No is selected in the combo box. I was able to accomplish this using fillColor but it only highlights when the field is selected. Is there a way to have the field highlighted regardless if it is selected or not based on the No value?
I posted the following to your same question in the Windows forum after you closed it:
When you say required, are you talking about setting the "required" property of a field, so that it must have a value before a submit form action is allowed to take place?
If so, you can set it when the combo box selection is changed, either in the combo box's Validate event or the corresponding text field's Calculate event. If you need help with the code, post again.
For the second problem, you probably are viewing the form when field highlighting is enabled. If you disable it, you should see the highlighting (fillColor) that you specify.
Thanks for the response. It was easier for me to disable the field highlighting option and use the fillColor and textColor scripts to bring attention to the desired fields. Thanks for your assistance.