Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

help showing and hiding fields with javascript livecycle 7.x

Avatar

Former Community Member
This might be pretty basic I am new to designer and using 7.x Can someone help me.



I have two radio buttons. Once the second radio button is selected I need a new text field to appear using JavaScript. I don't know how to link the second radio button to a new hidden field. Can someone show me an example or how to link the JavaScript to the new field.



Thanks for your help
2 Replies

Avatar

Level 2
Jeff -



I am new to this also but I think I can help.



Use the click event in the Script Editor and key



x.presence = "visible";



Where "x" is the name of the field you want to see. Also set the presence on the Object pallet to invisible not hidden.

Avatar

Former Community Member
Nancy what I did was add this code to the radio buttons. I didn't save my PDF as dynamic, that was the problem I was having..

(make sure you keep the underscore - and with the click event right)



form1.pg1.formSection.bodySection._NewTextField.addInstance(1);

form1.pg1.formSection.bodySection._EditTextField.removeInstance(0);



form1.pg1.formSection.bodySection._EditTextField.addInstance(1);

form1.pg1.formSection.bodySection._NewTextField.removeInstance(0);



thanks for your help Nancy