Skip to main content
warm_Lullaby5CA0
Known Participant
August 22, 2017
Question

Show or hide pdf form pages based on user selection

  • August 22, 2017
  • 1 reply
  • 1715 views

I have designed a pdf form to be used as a questionnaire however it is extremely long and comprehensive and it is not always necessary for a user to fill in the complete document.

On the first page of the document I have a list of the different sections of the questionnaire and then if the user checks the checkbox of the sections, then only the pages of the document of those sections gets displayed and the ones that don't get selected, the relevant pages stay hidden.

From what I have read, I will need to convert the pages to a template (Which I have figured out that I do under the organize pages tool) and then under the checkbox properties I will need to run a javascript under the actions tab to show or hide the relevant pages.

My problem is I have no idea how to write javascripts. Does anyone have a line of code that I could copy into my document and substitute the page numbers (or whatever the case may be) which would give me the desired action on the document? I can't imagine that it is very complicated javascript, I just have no idea how to write it.

Or, if there is another way of setting up this document the way I want to, any help would really be appreciated.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
August 22, 2017

Is the file going to be used in Acrobat or in the free Reader?

On Tue, Aug 22, 2017 at 12:12 PM, calvins61590516 <forums_noreply@adobe.com>

warm_Lullaby5CA0
Known Participant
August 22, 2017

Hi,

Well I am creating it in Acrobat however I am assuming that most of the users (my clients) who will complete this form will be using the free reader.

But, if it is not going to work on the free reader... then I can just select the sections to display and then save it and send it to the client?

What do you think?

try67
Community Expert
Community Expert
August 22, 2017

Doing it in Reader is more tricky. You can't show/hide pages there, but you can spawn pages from a Template and then delete them.

If you can do it on your end it will make things much easier...