Skip to main content
Participant
April 17, 2020
Question

Linking combo box option to text field, bookmark, or URL

  • April 17, 2020
  • 1 reply
  • 282 views

Hi gang!

 

I'm stumped on this one... I've created an ebook for a client, and they've asked if it's possible to have team member bios link to a specific form field (when filled in).

 

My current layout has fillable forms I created in InDesign, and all they would need to do is write in the individual's name (see attached). There's an appendix page at the end of the doc with blank fields, where we would have the client write in/copy paste that information before saving out. Apparently, that's "too complicated" for them. (oy vey).

 

I thought about using a combo box rather than a standard text field, which eliminates manual entries, but still doesn't link to anything.

 

Here is my challenge/query:

1. Can I link a combo box selection to... anything? A bookmarked page with that individual's bio information? A URL off-site with bio information? Would it be possible to create an icon next to the combo box, that when the name is selected in the combo box field, becomes active and directs the user to that bio information?

 

Or is there a better option?

This topic has been closed for replies.

1 reply

Thom Parker
Community Expert
Community Expert
April 17, 2020

Yes, it's possible to create quite detailed document navigation with scripts.  There are many possibilities. But the easiest thing to do is just set a page number.

For example, here's a script to put in the Custom Validate script  on a dropdown

 

if(event.value == "Larry Boo")

     this.pageNum = 25; // Go To page 26

else if(event.value == "Mo")

     this.pageNum = 28; // Go To page 29

 

Notice how the page numbers in JavaScript are one behind the document page numbers. That because in JavaScript everything starts are 0.

You can find endless details on creating all kinds of document navigation (paid for site) here:

https://www.pdfscripting.com/public/DocumentNavigation.cfm

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often