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

Changing Checkbox options based on variables

Not applicable
What I need to create is an area that has 5-8 check-boxes, but the text beside those check boxes will change based an option that is selected in a drop down menu elsewhere in the file.

The reason I need to do this is due to lack of space and better work flow.



Can anyone help with this or any other possible way to do it?



I have used LiveCycle but not much coding.



Thank you in advance.
4 Replies
Not applicable
You could change the caption of the checkboxes by using javascript..



on the CHANGE event of a drop down list, you could add script similar to:



if (xfa.event.newText == "Yes") // (if yes is selected in the dropdown)



xfa.resolveNode("CheckBox1.caption.value.#text").value = "Rooster"; // (change the check box caption to 'Rooster')



else



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



xfa.resolveNode("CheckBox1.caption.value.#text").value = "Broccoli";



P.S. Make sure you save the form as a dynamic form rather than static!
Not applicable
by the way, the above solution only changes the captions & not the checkbox. the checkbox property name won't change.. if you want a different checkbox / property for each different caption, you might have to create all the checkboxes in design time, and then hide & show checkboxes depending on the dropdown selections
Not applicable
Thank you so much for your help.

I am only trying to change the captions.

From reading the code, it seems everything should work but I'm still having some trouble making it work.

Would you mind clarifying it a bit in the steps?

I am not very familiar with JavaScript or LiveCycle Designer.



Thank you so much in advance.
Not applicable
If you don't mind, please send me the form.. (MASHDOWN45 AT GMAIL DOT COM) otherwise I cannot know what is wrong..