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

Need Javascript Guidance for Popups

New Here ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

Hi All,

 

Let me start by saying I have very little experience using adobe and even less experience writing javascript code. I have a pdf form with many different check boxes on it, and I was asked to create a button that will allow the person filling out the form to do so via popups.

For example, there is one checkbox for a statement that says something like "2+2=4", another that says "2+2=5", and a third that says "2-2=0". I would like to create a button that opens a popup which askes the user if 2+2=4. If the user hits yes, the check box becomes checked off. If the user hits no, the check box does not get checked off. 

Regardless of the users answer, I need another popup to open after the user imputs their answer into the first (and it disappears). So after the user clicks "yes" to "does 2+2=4", the checkbox will populate, the popup will close, and another popup will open and ask "does 2+2=5" (and then answering this question will do the same thing as the previous). And so on and so forth.

I hope that example was clear enough, but essentially what I am looking for would be the Javascript syntax to execute two separate operations: 1) have input in a popup affect another form filler, 2) have input from a popup make another popup appear. I understand that there is a custom dialogue box command, I have just had some issues tying to understand and learn how to use it in this context. 


Any help would be greatly appreciated, thank you!

TOPICS
Acrobat SDK and JavaScript

Views

258

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 ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

LATEST

 

What you are asking about is not a simple script. You'll need to spend some time learning about scripting in Acrobat.

But to start, you can read about UI elements, including popups at these links.

https://www.pdfscripting.com/public/Alerts-Popups-and-Other-UI.cfm

https://acrobatusers.com/tutorials/popup_windows_part1

https://acrobatusers.com/tutorials/popup_windows_part5

 

 

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

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