Hide and show fields using checkbox

Avatar

Avatar

likhithas804471

Avatar

likhithas804471

likhithas804471

02-11-2016

Hi guys,

I have a form that I'm creating in acrobat. In this form I have 4-5 fields where I need to hide these fields using checkbox. I wrapped these fields in a subform and make the subform as hidden. I gave condition for checkbox as when it is checked the subform should visible and when it is unchecked the subform should be invisible. It is working... But when I generated my PDF file the data is hidden even the checkbox value is 1. If again I uncheck and check the checkbox the data is visible. I need my data to be visible when I downloaded my generated PDF form...I need a solution for this.

Accepted Solutions (0)

Answers (3)

Answers (3)

Avatar

Avatar

wallyh22242762

Avatar

wallyh22242762

wallyh22242762

03-11-2016

Are you saying that, when you open the form after having saved it with the checkbox checked, the hidden subform isn't visible until you uncheck and recheck the checkbox?

If so, you can add some JavaScript code to the initialize event of the subform, which will be triggered when the form is first opened. It can then check whether the checkbox is checked and make the field visible if it is, something like this:

if (Checkbox1.rawValue == 1) {

  this.presence = "visible";

}

Avatar

Avatar

_Bruce_Robertson

MVP

Total Posts

1.8K

Likes

268

Correct Answer

372

Avatar

_Bruce_Robertson

MVP

Total Posts

1.8K

Likes

268

Correct Answer

372
_Bruce_Robertson
MVP

02-11-2016

Hi,

I'm not sure I understand the problem, can you upload your form to a file share site, like Googe Docs, or Dropbox, or whatever and post a linkto this thread.

I'm particularly confused by what you mean by "when I generated my PDF file", what do you mean by generate?

Regards

Bruce

Avatar

Avatar

try67

Avatar

try67

try67

02-11-2016

[Question moved to the LiveCycle Designer forum]