22 Replies Latest reply on Feb 12, 2010 7:54 AM by Farah_P

    Hidden subform issue

    JennyAnnRowe Level 1

      I have a form that includes a series of hidden subforms. One hidden subfrom, when called up and when one of its checkboxes is clicked, is supposed to call up different hidden subforms. These last subfroms reside on a different page. I usually use a simple script to call up hidden forms and it works just fine...until now. It won't call up the last subform. It seems that the last subform won't present because it is on a different page.  I dont know why that shold matter, but it seems to.


      I've attached the form I am working on. The problem is in getting MathAcc to present on page 3 when LATMathEng on page 2 is checked.


      Thanks so, so much to anyone who can help me out.

        • 1. Re: Hidden subform issue
          JennyAnnRowe Level 1

          I figured it out...

          I had to define the page on which the hidden subform was to present.  Rather than using just a standard conditional script such as. "if this checkbox is clicked, make this subform appear," I had to say, "make this subform on page three appear."

          • 2. Re: Hidden subform issue
            Rob in AZ



            I hope you don't mind, but I found this topic and used your form to explain something I wanted to do in another forum topic.  The person who helped me updated your document with new functionality.  The new enhancement eliminates the whitespace between the TAKS sections, if you happen to skip selections.  I have attached the revised form.  If you'd like to see the full text of the post, here's the link: http://forums.adobe.com/message/2387496#2387496




            • 3. Re: Hidden subform issue
              JennyAnnRowe Level 1

              I don't mind at all--in fact, I really appreciate your being able to use that form because now I have learned a very valuable technique too!  Thanks again, and good luck with that medical form--looks pretty fun to build!



              • 4. Re: Hidden subform issue

                Hi Guys,


                I was looking at the example posted and I'm a little confused. When I open the file in Designer, I'm not able to see the hidden subform. For example, where exactly is TAKSsubjects being called FROM? Sorry if this is a silly question, but it's a bit over my head. Any help would be appreciated.



                • 5. Re: Hidden subform issue
                  JennyAnnRowe Level 1

                  Hi Farah,


                  Sorry it has taken me a while to get back to you--holiday stuff going on.

                  You won't see the hidden subforms (TAKSsubjects, SpanishTAKSsubjects, etc) on the form itself because their visibility is set to "Hidden(Exclude from layout). You should see them on the Hierarchy palette on the left though. Then, of course, when you view the form as a pdf and then click on one of the TAKS options checkboxes, the appropriate subform will pop up.


                  Does that help, or did I completely miss the point of your question?


                  Warmest regards,


                  • 6. Re: Hidden subform issue
                    Farah_P Level 1

                    Hi Jennifer, Thanks for your reply. It does help, but how can I set it so that I can see them in the layout? I see them in the Hierarchy palette now, but when I click on any of them, it flashes on the screen very fast and then I can't see anything. Thanks! Farah.

                    • 7. Re: Hidden subform issue
                      JennyAnnRowe Level 1

                      Hi Farah,


                      Just temporarily change the visibility settings from "hidden" to "visible". First, in the hierarchy palette, click on the hidden subform you want to see, then move over to the right and in the object palette, change the visibility setting to visible. If two or more of the subforms are visible, then they will probably be stacked on top of each other because I believe that the version of that particular form you are looking at is an early version and I had not yet made the hidden subforms stack nicely on top of each other upon visiblilty.


                      May I ask if you are working with this particular form as an employee or contractor of a school district or agency?

                      • 8. Re: Hidden subform issue
                        Farah_P Level 1

                        Thank you!


                        I'm really new to using subforms, so I'm still trying to figure it all out. I'm not affiliated with a school district, I'm merely using it as a tool to figure out all these functions! I often find it easier to look at a finished product and work backwards, because I have no background in programming. Thanks again for your help!

                        • 9. Re: Hidden subform issue
                          JennyAnnRowe Level 1

                          You are very welcome!  I learn a lot from these forums. Another good resource is J.P. Terry's book, Creating Dynamic Forms with Adobe LiveCycle Designer, which I think is published by Adobe.  Good luck!


                          Warmest regards,


                          • 10. Re: Hidden subform issue
                            Farah_P Level 1

                            I'm stuck!


                            I have hidden two subforms within my form, and I thought I wrote the code out correctly, but it doesn't seem to be pulling it up. I've attached my form here, and insight would be great.

                            • 11. Re: Hidden subform issue
                              JennyAnnRowe Level 1

                              Hi Farah,


                              I brought up your form and your are correct--your script does look fine!  I have to run out to a long meeting and will not be able to poke around the form to find out what is going on, so my suggestion at this point is to post your question to the discussion board. I think that if you just post the question about why the script isn't working and attaching your form, you will get an answer quite soon.  The experts on the board always have very helpful insights.


                              Let me know if you do not get your problem resolved!

                              • 12. Re: Hidden subform issue
                                Farah_P Level 1

                                You were right, someone helped me very fast! I just needed to save it as a dynamic PDF. Thanks again.

                                • 13. Re: Hidden subform issue
                                  Farah_P Level 1

                                  Hi guys,


                                  I have another question! So I've created a form where the user will click one of 6 options and subsequent sections will show up. The final form should only be ONE page, but right now, all the sections span 3 pages. When I hide the subform and try to stack them all in the space I've allocated, the subforms are changing spots in the hierarchy, so basically the second subform I add becomes a further subform of the first one added. Is there a way around this? I just want them all to occupy the same space, but not interfere with one another's place in the hierarchy. Help please!!!!!

                                  • 14. Re: Hidden subform issue
                                    Kevin Cavallo Level 4

                                    When you hide the subforms, make sure you set the presence to "hidden".  Setting the presence to "invisible" will hide the object, but the space that it takes up will still be allocated on the form.  "hidden" will ensure that the hidden object will not take up space on the form

                                    • 15. Re: Hidden subform issue
                                      Kevin Cavallo Level 4

                                      Sorry, I just went back and read the entire post trail.  Is your form set up using flowable layout, or is it using positional layout?

                                      • 16. Re: Hidden subform issue
                                        Farah_P Level 1

                                        Hi Kevin,


                                        It's positioned.

                                        • 17. Re: Hidden subform issue
                                          Kevin Cavallo Level 4

                                          If I understand your problem, then that's your issue.  When you place subforms positionally they will always show up in the document at the spot where you place them when they're made visible.  Try wrapping all of the hideable subforms within a parent subform, and set that subform to flowable layout.  That should stack any of the visible subforms within one-after-another.  You can then rearrange the child subforms in their proper hierarchical order.

                                          • 18. Re: Hidden subform issue
                                            Farah_P Level 1

                                            This is sounding way over my head. I'm going to have to try to figure it out another way. Thanks though.

                                            • 19. Re: Hidden subform issue
                                              Kevin Cavallo Level 4

                                              Maybe not - can you post your form?

                                              • 20. Re: Hidden subform issue
                                                Farah_P Level 1

                                                Thanks Kevin.


                                                So on the first page, all the items should always appear, except for the area occupied by Deliver Out (Withdrawal) Information. That is the space where all the other sections on page 2/3 should occupy, based on the radio button selected in section Transaction Type.

                                                • 21. Re: Hidden subform issue
                                                  Kevin Cavallo Level 4

                                                  See attached form - I think this is what you want.  I may have lost a little bit of your formatting.


                                                  The issue was the positioned layout of the form.  When you are hiding subforms and you need the rest of the form to move up and fill in the blank space, you need to use flowed layout.  Fortunately, the way your form is organized it is easy to use a combination of both flowed and positioned layout.  Here's how it works, and I apologize for the long explanation.


                                                  When you have a subform that is set to positional layout, the position of each object that you add is set to where you put it relative to that subform.  When you start a new form in Designer, it creates a default subform that is the size of the page; your page is essentially one large subform.  If you add a page 2, a second subform will be created that is also the size of a page.  Everything added to page 2 really gets added to the page 2 subform.  This concept is sort of hidden from newbies since to them it just looks like they're adding objects to pages.  However it's an important concept. Instead of having one large subform that is the size of the page, you might have two subforms, each 1/2 of the page size. Each is set to positioned layout.  When you put objects in the top half of the page, they are going into the top subform, and will be positioned relative to the top-left corner of the subform.  When you add objects to the bottom of the page, they go into the lower subform and be positioned relative to that subform.  If you decide to swap the two subforms on the page, the entire lower section will swap positions with the upper section, but the contents inside will stay in position relative to the other objects inside that subform.  So you can move sections around without the things inside getting mixed up. The position in the hierarchy does not matter, what matters is the x,y position of the object inside the subform.


                                                  On the other hand, a subform that is set to flowed layout will display objects inside in strict hierarchical order.  It takes the first object that it contains and places it at the upper-left hand corner.  Then it takes the next object and places it directly below the first.  Then the third below the second, etc.  It butts them up against one another.  If you swap the order of objects in the hierarchy, it will change their order in the subform since order matters.  The x,y value of each object is ignored.


                                                  What I did on your form combines both of these behaviors.  Your form was already organized into sections that used positioned subforms, which is good since you don't want the contents of each section to shift around.  Unfortunately those sections were sitting inside page-sized positioned subforms, so that regardless of whether the sections around it were hidden, a section would still be displayed on page two or three or whatever, based on it's x,y relative to the page subform.


                                                  Instead, I created a parent subform that is set to flowed.  I then dragged each of the subforms sections that make up the document into that parent subform.  Then I deleted the page subforms, which were now empty.  So what happens now when the form is rendered is: The first subform under the parent ( REQUESTOR INFORMATION, RBC ACCOUNT INFORMATION, SECURITY INFORMATION, all one subform) is placed on the form.  Then the next child (TRANSACTION TYPE) is placed below that.  The next child is TRANSFER INFORMATION; if it is visible it will be placed directly under TRANSACTION TYPE.  However if it's hidden it won't be displayed and the next child,CROSS BORDER DELIVER OUT will be either displayed or not based on whether it's hidden, and so on.  Each of the visible section subforms will flow down the document one after another, without leaving any space in between, and the contents of each will move as a group since the section subforms are positioned.


                                                  I hope the above is clear.


                                                  The other thing that I did was to group the radio buttons in the TransactionType subform into a Radio Button List.  This makes them automatically operate as mutually-exclusive; only one can be selected at any time.  I put the code in the change event for the radio button list that hides whatever is visible and then makes the appropriate subform visible based on the butten that was selected.


                                                  Finally, I added code to the initialize event of the radio button list to default the Transfer Information button as selected on startup, and to set the Transfer Information subform to visible.  All of the other transaction subforms were set to hidden.  You can easily change which subform is the default on startup, or remove that code and set Transfer Information to hidden so that nothing is displayed.


                                                  Amazingly, the whole thing took less time to do than writing this response.  Create a subform, drag, delete, write some script.


                                                  Hope this helps.


                                                  • 22. Re: Hidden subform issue
                                                    Farah_P Level 1

                                                    Wow, thank you so much! That really clears things up for me!