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

Indesign - Drop Down Menu choice changes/hides pages

Community Beginner ,
Aug 08, 2022 Aug 08, 2022

Copy link to clipboard

Copied

Hi,

 

I'm not sure if it's even possible but I was hoping to make a Interactive PDF on Indesign where there will be a drop down list at the beginning and whatever answer you pick will determine what the rest of the PDF looks like.

 

So for example, this list would have two options, and whichever one you choose will subsequently give you a different form to fill out that asks questions particular to the original drop down choice.

It's important that I keep it on the same PDF rather than having two different PDF's.

Also, I have no idea where to start so there isn't anything I can upload to show you what I mean, i'm just hoping the above is enough information to go off.

Like I said, i'm not even sure if it's possible or not, I have the most up to date verison of InDesign if that changes anything.

TIA,

Dan

TOPICS
Create PDFs , Edit and convert PDFs , How to

Views

1.8K

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Aug 08, 2022 Aug 08, 2022

1. Create pages that you wish to turn into a template.

2. Create a template from those pages, to do that you need to select 'Organize Pages' tool then click on page you wish to turn into a template and from toolbar select 'More' then 'Page templates', now give that template a name and click 'add' now uncheck checkbox next to template name to make template hidden. Now repeat for other pages and remember those template names you will use those in script.

3. Now to make a script. Let's say you name

...

Votes

Translate

Translate
Community Expert ,
Aug 08, 2022 Aug 08, 2022

Copy link to clipboard

Copied

It's possible with acrobat pro. You can create template pages and then use script in dropdown field to spawn template depending on dropdown choice.

Votes

Translate

Translate

Report

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 Beginner ,
Aug 08, 2022 Aug 08, 2022

Copy link to clipboard

Copied

I believe I have that with my Creative Cloud subscription.

In your opinion would it be easier to make all the pages needed and then make it interactive after the fact?
Also, I've never scripted anything in my life, is that easy enough to do?

Thanks

Votes

Translate

Translate

Report

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 08, 2022 Aug 08, 2022

Copy link to clipboard

Copied

1. Create pages that you wish to turn into a template.

2. Create a template from those pages, to do that you need to select 'Organize Pages' tool then click on page you wish to turn into a template and from toolbar select 'More' then 'Page templates', now give that template a name and click 'add' now uncheck checkbox next to template name to make template hidden. Now repeat for other pages and remember those template names you will use those in script.

3. Now to make a script. Let's say you named templates 'template1' and 'template2' and dropdown choices are 'Item1' and 'Item2' (you will adapt those to your actual choices and template names),

as 'Validation' script of dropdown field you would use something like this:

 

if(event.value == "Item1")
this.getTemplate("template1").spawn(this.numPages, false, false);
else if(event.value == "Item2")
this.getTemplate("template2").spawn(this.numPages, false, false);

 

Make sure you also check 'Commit selected value immediately' in dropdown field properties under 'Option' tab.

Let us know if you need further help.

Votes

Translate

Translate

Report

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 Beginner ,
Aug 09, 2022 Aug 09, 2022

Copy link to clipboard

Copied

Fantastic, thank you very much

Votes

Translate

Translate

Report

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
Explorer ,
Aug 05, 2023 Aug 05, 2023

Copy link to clipboard

Copied

Is there a method to determine the precise arrangement of the Template page? Presently, whenever the template page is displayed, it is positioned at the bottom of the document. However, I aim for it to be positioned, for instance, as page 2.

Thank you

Votes

Translate

Translate

Report

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 05, 2023 Aug 05, 2023

Copy link to clipboard

Copied

Replace 'this.numPages' with page number.

Pages start from 0, so page 2 is number 1.

Votes

Translate

Translate

Report

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 15, 2023 Aug 15, 2023

Copy link to clipboard

Copied

Hi. This post has been most useful - thank you! However, I'm trying to add multiple pages in some instances...

 

For example, if user selects "4-day" from the drop-down then I want templates 2-day and 3-day to also be added.

 

What would the correct coding be to list more than one template?

 

Thanks in anticipation

Votes

Translate

Translate

Report

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 15, 2023 Aug 15, 2023

Copy link to clipboard

Copied

Use curly brackets to spawn more than one template, something like this:

if(event.value == "Item1"){
this.getTemplate("template1").spawn(this.numPages, false, false);
this.getTemplate("template2").spawn(this.numPages, false, false);}

 

Votes

Translate

Translate

Report

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 Beginner ,
Mar 01, 2024 Mar 01, 2024

Copy link to clipboard

Copied

How woudl you change this to work with a Checkbox?  On: Page Spawns, Off: No Page Spawns.

 

Thanks!

Votes

Translate

Translate

Report

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 ,
Mar 01, 2024 Mar 01, 2024

Copy link to clipboard

Copied

For checkbox to spawn: if(event.target.value !== "Off")

Votes

Translate

Translate

Report

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 ,
Apr 08, 2024 Apr 08, 2024

Copy link to clipboard

Copied

Hi, 

I wonder if you would be able to help as well. I have a similar issue. 

There is a Table of Contents and I would like to add a checkbox directly next to each section in the Table of Contents. When the Checkbox is Checked, I need the pages associated with that section Show. When checkbox is unchecked, hide the pages associated with that section. 

I hope this is not reduntant, but I looked throughout the community and could not find something similar. 

Votes

Translate

Translate

Report

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 ,
Apr 08, 2024 Apr 08, 2024

Copy link to clipboard

Copied

LATEST

This would be a complex thing to do, first you would have to create templates (which would be a lot of work on its own) then you would have to keep track of the pages you spawn because if you spawn more than one section and try to delete pages you will have to be careful with script to know exactly which pages to delete.

Votes

Translate

Translate

Report

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