Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

javascript + checkbox click after choosing a dropdown menu item?

Avatar

Level 2

I want to be able to choose a dropdown menu item and have it to also click specific check boxes after choosing each drop down item, using Javascript?

Thanks

Mike

4 Replies

Avatar

Former Community Member

On the exit event of the DD you will have to test to see which value was selected (you can use this.rawValue to get the selection). Once you get a match to what you want you can set the checkboxes by using CheckBoxName.rawValue = 1. Note that the value for the on/off can be changed (it is 1/0 by default) so make sure you are setting the right value.

Paul

Avatar

Level 2

Hi Paul, I am very new to LiveCycle so please forgive my ignorance, I am attatching the file for you to see.  When I click on the drop down box for item #18, choose "Finance", the text box below it will fill in with info and click some boxes in #16 and #17.

Thanks for your help

Mike

Avatar

Former Community Member

I have modified the form to show you what to do. It will seem confusing because you did not name the individual checkboxes hence occurance numbers must be used to reference the right object.

As a tip if you want to get an object name into the script editor, simply put your cursor where you want the object to appear, then hold down the Alt key and point the mouse the the field you want. As you hover over an acceptable object the cursor will change to a V. Once that happens, click th emouse and the fields object reference will be placed in the script editor. Now you simply have to choose a method or property to add to the expression.

Hope that helps

Paul