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

Help with validating a numerical (text) field.

Community Beginner ,
Dec 07, 2017 Dec 07, 2017

On my form I have several numerical fields that must be completed.  I checked the "Required" property box, but I don't see any benefit.  So I used a "On Blur" script type with the javascript below.  This works but the function fires 3 times before the cursor is back in the field for correction.  Below is my script.

var oal = this.getField("OAL");

if (oal.value == 0)

{

app.alert('Must complete Over-All-Length field!');

oal.setFocus();

}

TOPICS
Acrobat SDK and JavaScript , Windows
305
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
no replies

Have something to add?

Join the conversation