Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Form with check boxes to hide unhide subforms

Avatar

Avatar
Boost 1
Level 1
lanar37171111
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
lanar37171111
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
lanar37171111
Level 1

14-12-2016

I have a form that I am creating in LiveCycle Designer that has multiple check boxes and other fields on page 1.  Page 2 has some standard conditions.  I also have hidden sub forms on page 3 and on, that I want to make visible based on what check boxes are checked.  Is this possible?

Replies

Avatar

Avatar
Level 1
Jon_Fritz_II
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
Jon_Fritz_II
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile
Jon_Fritz_II
Level 1

14-12-2016

Moved out of the Forum Lounge and over to the LiveCycle Designer forum.

Avatar

Avatar
Validate 1
Level 3
lateniteNC
Level 3

Likes

12 likes

Total Posts

98 posts

Correct Reply

13 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
lateniteNC
Level 3

Likes

12 likes

Total Posts

98 posts

Correct Reply

13 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
lateniteNC
Level 3

14-12-2016

Yes, this is common functionality with a dynamic form.

I am assuming that the subforms on page 3 have been their presence set to "hidden." Thus, when we check the box (changing its raw value from 0 to 1), the subform will appear. You need a bit of code to change the property from hidden to visable.

The best way to do this is to place some code in the click event of the checkbox on page 1 that  you want to trigger the change in presence from hidden to visible. Using javascript the code would be:

if (this.rawValue == 0){

  xfa.resolveNode("Some_hidden_Subform_onP3").presence = "hidden";

}else{

  xfa.resolveNode("Some_hidden_Subform_onP3").presence = "visible";

}

This code simply says of the checkbox is unchecked, the subform stays hidden; if the value of the checkbox changes to checked (other values besides zero), the subform is now visible. Substitute the name of your subform for the name in ("  ").

Avatar

Avatar
Boost 1
Level 1
lanar37171111
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
lanar37171111
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
lanar37171111
Level 1

15-12-2016

This is the code that I have:1084791_pastedImage_0.png

My subform6 is on the second page at this time and is hidden.  However, when I select the check box, the subform does not change to visible.

I also tried the following code without any success:

if(this.rawValue == 1){

= "visible";

}else{

= "hidden";

}

Any ideas why it is not working?  I can share the file if that is easier.

Thank you!

Avatar

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

269 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

269 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile
_Bruce_Robertson
MVP

15-12-2016

Hi,

Are you getting any exceptions.  Do you have "when exception is thrown" set to break in Acrobat under Edit ... Preferences ... JavaScript.

If you field is on Page2, then I would expect the resolveNode reference to be "Page2.Subform6".  In the script editor you can generate the reference to your fields.  Place your cursor in the Script Editor where you want your reference to appear, then go back to the form and select the object while holding down the Ctrl key and the reference will inserted into your Script.

If you are still having problems, upload your form somewhere like DropBox or Google Docs, and post a link in this thread and we can have a look.

Regards

Bruce

Avatar

Avatar
Boost 1
Level 1
lanar37171111
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
lanar37171111
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
lanar37171111
Level 1

16-12-2016

Hi,

I am still having problems.  The link to the form is https://www.dropbox.com/sh/2qktrreatjnd1rb/AAD5Ep11kTMkiZkiisceeb7xa?dl=0 .  Can you please take a look at the Driveway Residential check box?

Thank you for your help!

Avatar

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

269 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile

Avatar
Boost 50
MVP
_Bruce_Robertson
MVP

Likes

269 likes

Total Posts

1,782 posts

Correct Reply

372 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 250
Boost 25
View profile
_Bruce_Robertson
MVP

17-12-2016

Hi,

The reference to you field needs to be case-sensitive, so Page2.Subform6 not page2.subform6.

But I suspect you've been playing around with different options.  You also need to save you file as a "Adobe Dynamic XML form", which is one of the options on the save file dialog.  A static PDF doesn't allow changes to the layout.

Avatar

Avatar
Validate 1
Level 3
lateniteNC
Level 3

Likes

12 likes

Total Posts

98 posts

Correct Reply

13 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
lateniteNC
Level 3

Likes

12 likes

Total Posts

98 posts

Correct Reply

13 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
lateniteNC
Level 3

18-12-2016

See Bruce's comments above.

You had a couple issues on your form, primarily that the document was saved as a static, rather than dynamic form. Additionally, it is often helpful to name your fields so that you do not end up with two fields having the same name. I changed the name of some of your checkbox fields to address this concern. I saved your form as a dynamic form, then added two text fields on page 2 for testing purposes (Driveway - Residential and Patios). Finally, I put the code in the click, not the change event.

Now if you check either one of those two checkboxes, the text (technical specs) will appear on page two. Just repeat the process with the other checkboxes and load the required specs in separate textboxes on page two. I located both hidden textboxes at the top of the page as I assumed that not more than one text box at a time would not be checked. If so, you may have to position your textboxes.

You also had a problem with the radio button group at the bottom of the page, which must have mutually exclusive values (you had two buttons returning a value of 1.) I fixed this as well.

You can download the file at: Dropbox - Engineering Permit 11.17.16.pdf

Avatar

Avatar
Boost 1
Level 1
lanar37171111
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
lanar37171111
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
lanar37171111
Level 1

19-12-2016

Thank you for all your help!