Skip to main content
chrisr601481
Participant
February 7, 2018
Answered

Acrobat pro DC if than

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 is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct 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!");

2 replies

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!");

Translate
chrisr601481
Participant
February 7, 2018

Thank you, this is great!

Translate