Expand my Community achievements bar.

SOLVED

Hide/Display Subforms with a click of a radio button

Avatar

Level 2

I'm totally new to this and have very little idea of what I'm doing.  I've gotten my form to display/hide the questions based on the click of a radio button.  My next question is...how do I eliminate the white space in between the questions where the subform of questions is "hiding" until the user clicks the radio button?

thanks in advance to anyone who can help me with this!

1 Accepted Solution

Avatar

Correct answer by
Level 10

You may be setting the presence property to "invisible". That's why that white space appear on the screen.

Try setting the value to "hidden", it will remove the space.

If you use subform1.presence = "invisible", the subform will not be visible for the user but occupy space on the form..

If you use subform1.presence = "hidden", the subform will not be visible for the user and also does not occupy space on the form..

Additionally the Page subform Content type should be changed to be "Flowed" and the form needs to be saved as Dynamic XML form.

Subform_ContentType.jpg

You need do the following to make the form Dynamic.


     1) Goto File menu -> Form Properties and select Defaults tab. Change the Default Render Format as Dynamic XML form

     2) Select the Preview Tab. Set the Preview type as "Interactive Form" and Preview Adobe XML form as Dynamic XML form

     3) Finally while saving the PDF select Save As Type as "Adobe Dynamic XML Form".

Thanks

Srini

View solution in original post

5 Replies

Avatar

Correct answer by
Level 10

You may be setting the presence property to "invisible". That's why that white space appear on the screen.

Try setting the value to "hidden", it will remove the space.

If you use subform1.presence = "invisible", the subform will not be visible for the user but occupy space on the form..

If you use subform1.presence = "hidden", the subform will not be visible for the user and also does not occupy space on the form..

Additionally the Page subform Content type should be changed to be "Flowed" and the form needs to be saved as Dynamic XML form.

Subform_ContentType.jpg

You need do the following to make the form Dynamic.


     1) Goto File menu -> Form Properties and select Defaults tab. Change the Default Render Format as Dynamic XML form

     2) Select the Preview Tab. Set the Preview type as "Interactive Form" and Preview Adobe XML form as Dynamic XML form

     3) Finally while saving the PDF select Save As Type as "Adobe Dynamic XML Form".

Thanks

Srini

Avatar

Level 2

I do actually have them set as hidden.

There is the initial question with the radio button, and then underneath that is the hidden set of questions.  If I don't leave space inbetween that and the next question, the hidden subform comes up on top of the second visible question unless I leave white space in between.

Avatar

Level 7

There could also be several other reasons why your white space is not going away. For the form to "shrink up" as fields/subforms are hidden, you need to set the form up as a dynamic form. Your topmost subform needs to be set as Flowed and the child subforms need to be set to Positioned.

Avatar

Level 10

Can you check whether your subform is set to Flowed and saved as Dynamic as mentioned in the above response.

Thanks

Srini

Avatar

Level 2

I did not have the page subform set as flowed.  It works now.

Thank you so much for all your help!!