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.

Drop Down Selects Sub Form

Avatar

Level 2

I am a novice to Live Cycle Designer and have managed to figure a lot out in the forums. However I am lost when it comes to how to make a Subform visable and hidden via a drop down selections. I have read several articles and tried to use some code I have seen. I even opened a sample and tried to build off it and managed to mess that up too. So I need to know two things. First where can I get some real instruction on how to code the Java for this function. I need step by step since I have never really coded in Java. Also where can I get some better tutorials online. I really like the video's but a good book or PDF would not hurt either. I realy love what can be done with the designer I just wish more of it was user interface and not code required. In my efforts to solve this issue I have learned so much more of it's abilities.

1 Reply

Avatar

Level 7

You can use FormCalc rather than Java if you are not familiar with Java. To make things hidden or visible depending on what happens in a dropdown menu you will need to do:

- For the dropdown you will need to assign values to the possible choices in the Object>Binding tab by checking the box next to "Specify Item Values". Now each choice will have a number value and you can use that to determine what happens when each choice is made.

- In the Exit event of the dropdown you put the following code (in FormCalc):

if ($ == 1) then  //you replace the number 1 with whatever the value is of your first choice

     subform1.presence = "visible" // replace subform1 with whatever the name of your object that you want to make visible is

     subform2.presence = "hidden"

elseif ($ ==2) then // you can do as many elseif statements as you want - depending on how many choices you have in your dropdown

     subform1.presence = "hidden"

     subform2.presence = "visible"

endif

I hope that helps.