Expand my Community achievements bar.

Saving a pdf question

Avatar

Level 3

Okay, I have a pdf I have created that has multiple fields that are set to hidden in the docReady command. Those fields are displayed only when certain events take place and are sometimes hidden again after another event takes place. The problem I am having (Or the question I am asking) is how would I keep the form from hiding those fields again when the completed form is opened later on as a reference in adobe reader.

For example... My customer information field is set to hidden (To avoid clutter when filling out other fields) until I click a button at the end of the form to display that field. The problem I have noticed is that by putting the customer information into a subform set to hidden on the docready event, when the saved form containing my filled out form also HIDES that customer field when its opened in reader. I want the completed form to open with that customer field visible (and filled out) when the person reading the information I have put in the form opens the form. Thanks for your help and you time

1 Reply

Avatar

Level 10

Hi,

You could wrap the docReady script in an if statement.

If the field(s) are null then set their presence to hidden, otherwise set their presence to visible.

if (customerSubform.customerName == null)

{

     customerSubform.presence = "hidden";

}

else

{

     customerSubform.presence = "visible";

}

This is Javascript and would work in the docReady. You would need to adapt the object references.

Hope that helps,

Niall