Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Show or hide pdf form pages based on user selection

New Here ,
Aug 22, 2017 Aug 22, 2017

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.

TOPICS
Acrobat SDK and JavaScript , Windows
1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2017 Aug 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>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 22, 2017 Aug 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2017 Aug 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...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 22, 2017 Aug 22, 2017

Alright, I will create the form on my side on Acrobat then. Will you be able to assist me with the javascript code that I will need to show the page?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2017 Aug 22, 2017

If you're setting it up in Acrobat simply delete the pages you don't need...

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 22, 2017 Aug 22, 2017

Oh, but I want to design the document in a way that all the pages are hidden until certain sections are selected and then the pages appear. I am going to be using the document daily for different clients so it will save me a lot of time.

Do you know where I can find the javascript code to use in the actions tab of a checkbox's properties to display the page once selected?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 23, 2017 Aug 23, 2017
LATEST

So you do want it to happen on the client-side... I recommend you search this forum (and the JavaScript forum) for information about templates. If you can't figure it out post again here.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines