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
BedrockMission!

Learn more

View all

Sign in to view all badges

Drop Down list

shaunaj64776481
Level 1
Level 1

Hello

                I am working with LiveCycle Designer ES2. I put a Drop down in on a PDF that I am making. When I chose a option on the drop down list I would like it to add an a text field in a spot. How would I do this?

3 Replies
mouslander
Level 7
Level 7

Not sure what you are asking. If you want your drop down to populate a field the code would be something like:

field1.rawValue = this.rawValue  //field1 is the field you want to populate. You should put this on the exit event.

if you want the text field to take a different value then you would use an if statement such as:

if(this.rawValue == "Boston"){

field1.rawValue = "MA"

}

else

if(this.rawValue == "San Diego"){

field1.rawValue = "CA"

)

I hope this helps

shaunaj64776481
Level 1
Level 1

1.JPG

This is what it looks like when I open it in the PDF

.2.JPG

So I would like to change the drop down box and it add an address to that text box below.

I do not see where I would use code to change this. I do apologize I am still learning about this program.

mouslander
Level 7
Level 7

If you want to change the text in your example that is 1234 Main Street you would need to modify your code. In the example below requires that the address field is a multi line field.

if(this.rawValue == "Reno"){

field1.rawValue = "NV"

addressField.rawValue = "1234 Main Street \n Reno, NV"

}

else

if(this.rawValue == "San Diego"){

field1.rawValue = "CA"

addressField.rawValue = "1234 Main Street \n San Diego, NV"

}