Expand my Community achievements bar.

SOLVED

Need help with a dynamic information gathering form

Avatar

Level 2

I found topics that explain how to display/hide sub-pages using a trigger field and a script, but these techniques create whitespace where there are hidden sub-pages in the form.  Is it possible to have the selected sub-pages flow together across multiple pages, without the whitespace?  I was thinking the first page would have a set of check-boxes that identify what information is needed in the form.  After clicking the appropriate check-boxes on the first page, a custom version of the form would be generated, with only the needed sub-pages displayed.  If this were a 1-page form, the prior examples would work. However, this is a multi-page form and I would prefer not to have blank sections throughout the form.  Any ideas?

Thanks,

Rob

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

To accomplish what you want you will have to make your Page1 a flowed subform. Before you do this take all of the rest of the fields on that page and wrap them in a positioned subform (I named the subform Header). You have set each of the subforms inside of the page1 subform by about .25 in. If you change the subform to flowed at this time everything will move to the left margin and there will be no white space in between subforms. To make up the white space between the header and the start of your subforms, expand the header subform to take up that additional space. Now you can change the Page subform to flowed. Everything will move left, then on the Page1 subform set a .25in margin on the Layout tab.

I have modified your sample so you can follow....see attached.

Paul

View solution in original post

5 Replies

Avatar

Former Community Member

I am not sure what you are referring to ...can you post some examples?

Paul

Avatar

Level 2

StateAssessmentDecisionRecord.pdf is an example that shows how clicking fields in the TAKS section hides/shows a sub-pages.  If you click TAKS and TAKS (Accommodated), but not Spanish TAKS, there is whitespace where Spanish TAKS is in the form, but not shown.

dynamic_form_example.xdp is a mockup of what I need.  I haven't received the real content yet, but it should illustrate the concept.  On the first page, the Dr. would click the box next to each area needed in the form.  Clicking the Generate Form button would trigger an action to unhide or include content requested.  I only built checkboxes for the first few sections.  More are actually shown in the form.  Instead of whitespace for the sections not selected, like the StateAssessmentDeicsionRecord.pdf, I would like to have all the sections flow together without whitespace.

I will eventually be given sections of information that need to be dynamically included.  For example, the Dr. may only be working on the neck, or on the neck, back, and thighs.  The Dr. would select the appropriate checkboxes on the first page and then only the specific sections would be included in the generated form.

I hope this helps clarify.  Thanks for the quick response!

Rob

Avatar

Correct answer by
Former Community Member

To accomplish what you want you will have to make your Page1 a flowed subform. Before you do this take all of the rest of the fields on that page and wrap them in a positioned subform (I named the subform Header). You have set each of the subforms inside of the page1 subform by about .25 in. If you change the subform to flowed at this time everything will move to the left margin and there will be no white space in between subforms. To make up the white space between the header and the start of your subforms, expand the header subform to take up that additional space. Now you can change the Page subform to flowed. Everything will move left, then on the Page1 subform set a .25in margin on the Layout tab.

I have modified your sample so you can follow....see attached.

Paul

Avatar

Level 4

Very cool solution, thanks!  I always learn so much from you.

Avatar

Level 2

Thanks for the advice, your solution works great!  I have attached the working prototype.  I'm already getting enhancement requests, so I may have more questions.  Thanks again!  Rob

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----