Expand my Community achievements bar.

Beginner! I need help on figuring out how to make a form display subforms/fields based on a drop do

Avatar

Former Community Member
I am trying to create a from that will allow the user to select a 1st, 2nd, or 3rd request. All of the request will need to be a little different so I would like to make the subform or feild that are relavant to the request type appear and the other be hidden. Should I use subforms to accomplish this or ????? I have looked all over for a answer but I can't find anything that seems to work for my needs. Can someone please help?



Thank You
2 Replies

Avatar

Former Community Member
Yeah, it's hard getting started when your new (I've been using it for 1 month now).

In general yes, subforms are the way to go. The basic approach would be to design your 3 forms (or maybe you could do one form and make the fields that don't/do apply invisible) as subforms and make them appear as required using "addInstance".



To use "addInstance" you have to save your file as a "Dynamic" form first (use "save as"). Then your main form "type" has to be set to "Flow Content" not "Position Content".



This should give you a start in your search.



Good luck!

Avatar

Former Community Member
Thank You for the response! I was able to get that far but I am still having trouble. First, I was able to get the form to work even though I used postioned content. I used 3 radio buttons and JS to get the subforms to appear and disappear. (Request1.presence ="visible"; Request2.presence ="hidden"; Request3 ="hidden" each button has a similar script on the Click event) The problem occurs when you go from the 3rd button to the 1st button. Both subforms show up but if you go in any other order the subforms hide and appear properly. ??????? Maybe I am going about this completely the wrong way.