Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Acrobat pro DC if than

New Here ,
Feb 07, 2018 Feb 07, 2018

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

TOPICS
Acrobat SDK and JavaScript , Windows
396
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 07, 2018 Feb 07, 2018

You can use this code:

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

Translate
Community Expert ,
Feb 07, 2018 Feb 07, 2018

You can use this code:

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 07, 2018 Feb 07, 2018
LATEST

Thank you, this is great!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines