Copy link to clipboard
Copied
I am looking for a javascript to cause a popup info box IF a checkbox from a radio button is selected.
I have a section PDF form that involves how an employee was transported to get medical care. They are given 3 options.
There are 3 radio buttons that correspond with this section
The first one is ambulance,
second is personal auto,
third is employee transported.
If the person filling this form selects the ambulance option, I want a box to pop up that states "You must contact HR Department @ ###-###-#### immediately"
The box should have an option to click "OK" and an "X" button to close the window. Please help!
I do not want the javascript to happen if the other two options are selected, only the "ambulance" option.
Thank you
Copy link to clipboard
Copied
Here is an article on the topic, and it even has a sample file linked at the bottom
https://acrobatusers.com/tutorials/popup_windows_part1
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
Here is an article on the topic, and it even has a sample file linked at the bottom
https://acrobatusers.com/tutorials/popup_windows_part1
Use the Acrobat JavaScript Reference early and often
Copy link to clipboard
Copied
You can use this code as the Mouse Up script of your radio-button fields:
if (event.target.value=="ambulance") app.alert("You must contact HR Department @ ###-###-#### immediately",3);
There's no "X" button to close the dialog, though, just an OK button.

