Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

If statement for drop down


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?


1 Reply


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

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


Form.Field.mandatory = "error";




Form.Field.mandatory = "disabled";


Hope this helps,