Expand my Community achievements bar.

If statement for drop down

Avatar

Level 1
When a user selects "Indiana" from my dropdown box, an informational text box (Indiana Former Employer Information) needs to change from optional to required.



I'm not familiar with scripting and don't know how to write this. I have part of it, but cannot figure out how to make the text field required. Suggestions?



Thanks,

--cat
1 Reply

Avatar

Level 4
In the change event put this (changed to suit your fields):



if (xfa.event.newText == "Indiana")

{

Form.Field.mandatory = "error";

}

else

{

Form.Field.mandatory = "disabled";

}



Hope this helps,



Tom