Skip to main content
Known Participant
October 19, 2024
Answered

hyperlink button to take user to a page but to also be dependent on a drop down menu

  • October 19, 2024
  • 2 replies
  • 818 views

I'm trying to program a hyperlink button to take user to a page, but I want that button to be dependent on a drop down menu

 

for example, the drop down menu will have options like: page1, page2, page3, etc

and if page1 is selected in the drop down menu, then the "take to page" button will hyperlink to page1,

but if page2 is selected in the drop down menu, then the same "take to page" button will hyperlink to page2, and so on…

 

can this be done?

This topic has been closed for replies.
Correct answer PDF Automation Station

Make the export values of the dropdown selections the zero-based page indices for the dropdown selection.  For example:

page1 /0

page2 /1

page3/2

The numbers after the / are the export values of the dropdown and the text before are the display value.  In the button, enter the following mouse up action:

this.pageNum=this.getField("Dropdown").value;

2 replies

PDF Automation Station
Community Expert
Community Expert
October 20, 2024

Make the export values of the dropdown selections the zero-based page indices for the dropdown selection.  For example:

page1 /0

page2 /1

page3/2

The numbers after the / are the export values of the dropdown and the text before are the display value.  In the button, enter the following mouse up action:

this.pageNum=this.getField("Dropdown").value;

Known Participant
October 21, 2024

Hello again PDF Automation Station! 🙂

I did what you suggested, but the button still doesn’t take me to the page number I put in the export values of the dropdown,

I’m not sure if I did this right,

 

I attached an example PDF of what I’m trying to do 😅

 

PDF Automation Station
Community Expert
Community Expert
October 21, 2024

The numbers after the / are the export values. You put export values like this /1 /2 /3.  They should be like this 1 2 3 etc.  Remove the /

New Participant
October 20, 2024

Olá, caso esteja usando o Acrobat Pro na função de "Preparar Formulário", temos a opção de "Lista Suspensa", que gera uma série de opções para resolver a sua dúvida.

Nela você pode adicionar uma opção para cada site que deseja e a pessoa que acessar, podera escolher a opção com o formato de lista suspensa.

Para funcionar, precisa criar a lista suspensa > adiconar os sites nas "Opções" do campo > ajustar "Abrir um link na Web" na opção do campo: "Ações".


Espero ter ajudado!