Skip to main content
Inspiring
Apr 16, 2020 5:37 PM UTC
Question

Checkbox selected triggers popup notification

I'd like to have a checkbox field named Multipstep, when selected, to trigger the default notification popup with a message I've configured. I don't see this as an available option in Actions, so I assume it requires JavaScript. Anyone know how I'd code this?

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Thom Parker
Community Expert
Community Expert
Apr 16, 2020 6:57 PM UTC
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Inspiring
Apr 16, 2020 6:28 PM UTC

Solved my own problem. If anyone encounters this, the code I used was: 

if (event.target.value != "Off") { // box is checked app.alert("MY CUSTOM ALERT MESSAGE HERE");

}

else { // box is unchecked

}

 

I added a JavaScript "Mouse Up" action to the checkbox to display this alert. There may be a better way, but this seems to work for me. 

Translate