Skip to main content
MaksDad07
Inspiring
April 24, 2018
Answered

Alert when radio button selected

  • April 24, 2018
  • 2 replies
  • 873 views

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 has been closed for replies.
Correct answer try67

Change the first line to:

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

2 replies

Inspiring
April 30, 2018

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.

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
April 24, 2018

Change the first line to:

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

MaksDad07
MaksDad07Author
Inspiring
April 25, 2018

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

try67
Community Expert
Community Expert
April 25, 2018

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