Expand my Community achievements bar.

SOLVED

Show/Hide Field

Avatar

Level 1

I was wondering if it was possible to Hide certain fields before the form is submitted/emailed so that the receiver of this form will not be able to see those fields but still be captured by the database?  Is this doable?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Here is a sample that can give you ideas..

https://acrobat.com/#d=e44sIFR9uXi1P4nrB*ZQYQ

In this sample, I have placed a Subforms with Text in them.When you click send email button, one subform will be hidden in the prePrint event. After you receive the email, you will only see one subform.

Thanks

Srini

View solution in original post

7 Replies

Avatar

Level 1

click on what you want to hide. then under the object window, look for the cell tab. On the bottom choose any of the options under the presence dropdown.

does that work?

Avatar

Level 1

Thanks for the reply Jack.  What I want to do is for the user to fill out the form in its entirety.  When the form is ready to be submitted, I want the form to hide certain fields in the background so that when the form is retrieved from their email box, they won't see specific information.  Does this help?

Avatar

Level 10

You can write code in the preSubmit event (If you are using the button type as Submit) to hide the sections that you do not wish the user to see.

You can use preSubmit event even if you are using "Email Submit Button".

Make sure you set two more settings on the form.

1) Save the form as Dynamic XML form.

2) In the File -> Form Properties menu. Under the Default tab, select the radio button "Automatically" for "Preserve scripting changes to form when saved".

Try these and let me know if you still have issues..

Thanks

Srini

Avatar

Level 1

Srini,

Would you happen to have a sample JS code that I can go off of?

Avatar

Correct answer by
Level 10

Here is a sample that can give you ideas..

https://acrobat.com/#d=e44sIFR9uXi1P4nrB*ZQYQ

In this sample, I have placed a Subforms with Text in them.When you click send email button, one subform will be hidden in the prePrint event. After you receive the email, you will only see one subform.

Thanks

Srini

Avatar

Level 1

Srini,

The solution you gave me works when I am testing with myself, however, it doesn't work when I send this form to others.  Shouldn't the form properties carry over with the form?

Avatar

Level 10

Try Reader extend the form..

If you have acrobat. Open the PDF in Acrobat and goto Advanced menu -> Extend features in Adobe Reader.

Save the file and use this for your user testing.

See if this helps.

Thanks

Srini