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

Drop Down List Box/List Box

Avatar

Not applicable
Hi



I am trying to replace 14 buttons with a list box or drop down list box.

Currently each button has a JS script setting the text of a Text Field Box:

for example: (Button1) TextField1.rawValue = condition1.value,(Button2)TextField1.rawValue = condition2.value, etc.



It would save space if I could add the script from the buttons to a list/dropdown box. Then the user would choose one of the items and it would run the attached script. So far, I have been unable to get this to work.



An example of the script in the change event of the Drop Down List Box that is not working:



if (this.rawValue == "1")

{

TextField1.rawValue = condition1.value

}

else if (this.rawValue == "2")

{

TextField1.rawValue = condition2.value

}

etc.



The Box's value are set up correctly. The file is saved as a dynamic XML pdf.



I must be doing something wrong. I cannot get the choices to change the text in the Text Field Box. It will display the first item's text, but it will not change if another item is chosen in the Box.



Any help would be appreciated.



Kind Regards,



Stephen
0 Replies