Skip to main content
MaksDad07
Inspiring
Apr 24, 2018 9:45 PM UTC
Answered

Alert when radio button selected

I have a radio button ( "Required" or "N/A" ), I would like to display an alert if N/A is selected.  I have attached the following script to the N/A button, but nothing happens.

if(event.value==="N/A"){

  app.alert("Required if ...",1,0,"Required?");

}

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Apr 24, 2018 9:49 PM UTC

Change the first line to:

if (event.target.value=="N/A") {

4 replies

Inspiring
Apr 30, 2018 1:22 PM UTC

Also,make sure you put the script under the action tab of the radio button that HAS THE VALUE N/A as its export value.  Scripts are not shared across buttons of the same group.

Translate
try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Apr 24, 2018 9:49 PM UTC

Change the first line to:

if (event.target.value=="N/A") {

Translate
MaksDad07
MaksDad07Author
Inspiring
Apr 25, 2018 1:39 PM UTC

I made the changes, but I still do not get an alert when the N/A radio button is selected.

Translate
try67
Community Expert
Community Expert
Apr 25, 2018 2:03 PM UTC

Can you share the file with us (via Dropbox, Google Drive, Adobe Cloud, etc.)?

Translate