Expand my Community achievements bar.

Drop down selection

Avatar

Former Community Member

I am new to Livecycle and need help to write a code. I have a drop down list and if user selects "other" a blank text box appears. I am not sure how to write the code.

Thank you for your help.

2 Replies

Avatar

Level 4

Welcome to the Forums! This is actually a great project for the Action Builder. This is a set of precoded scripts that you can call and it is a simple GUI that requires 0 code.

What you can do is create 2 fields: a drop down list and a hidden TextField. What you can do is add your options to the drop down box and then we can create an Action Build for showing the hidden field. After you create the drop down list, go to Tools - Action Builder. Click the button next to the trash icon to create a new one and in the Condition box select (object) and then select your drop down list. Then it will change to say "When drop-down list DropDownList1...and there will be a drop down box for you to select "text changed". Select the "other" value. Then in the Result drop down box select "Show/Hide an Object" and select your text field. So now when the user selects other from the drop down box, the text field will appear. Just make sure to set the presence of the textfield to hidden.