Skip to main content
Participant
January 5, 2026
Question

I need help writing a script for a Dialogue Pop up

  • January 5, 2026
  • 3 replies
  • 122 views

Hello I want to make button with a script that displays a custom Dialogue Pop Up window. I've searched for guides for how to do it like this, or this but nothing has been helpful for what I need.

 

Here is tha screnario:

We have three text fields: "Text 1", "Text 2" and "Text A".

 

There is a button with a script. When you press it checks if there if Text 1 and Text 2 are blank. If there is any text in both of them, a dialogue Pop-Up appears with two buttons. The text in the buttons is thext input in Text 1 and Text 2 respectively.

 

When you click on one of the buttons, it swaps the text input of the field Text A with the input of Text 1 or Text 2 depending on which button was pressed. i.e. if I press button 1 (which diplays the text from Text 1) the string from Text A is moved to Text 1 and the string from Text 1 is moved to Text A.

3 replies

try67
Community Expert
Community Expert
January 6, 2026

Writing dialogs is a pretty complex task in Acrobat. You got some good reference links in the replies above, but this might not be the best task to start with, if you're a novice in Acrobat JS...

 

If you're interested in hiring a professional to create it for you, feel free to contact me privately by clicking my user-name and then on the blue "Message" button.

Thom Parker
Community Expert
Community Expert
January 5, 2026
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often