Skip to main content
chrisr601481
Participant
February 7, 2018
Answered

Acrobat pro DC if than

  • February 7, 2018
  • 1 reply
  • 431 views

Hello I'm building a fillable form where if the field "Family Member Member1" is filled than the field "age1" becomes required.

What I'm having trouble with is once "age1" is required id like to make an if-then statement where it looks to see if "age1" is required than on blur if left blank to prompt message "cannot be left blank".

please help

This topic has been closed for replies.
Correct answer try67

You can use this code:

if (event.target.required && event.target.valueAsString=="") app.alert("You can't leave this field empty!");

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
February 7, 2018

You can use this code:

if (event.target.required && event.target.valueAsString=="") app.alert("You can't leave this field empty!");

chrisr601481
Participant
February 7, 2018

Thank you, this is great!