10 Replies Latest reply on Apr 30, 2015 3:39 AM by MarcusMacmillan

    Validate if a field is blank Adobe Acrobat Pro X

    MarcusMacmillan

      Hoping for some help please as this is driving me nuts!!

       

      I found some code below which works in reverse (ie if there is a single character or more in the field). However it won't work as event.value == "". I've tried adding ' || event.value == null ' and a few other things but I can't get it to work. I don't want to use the required field under the general text field properties tab as I have a few fields I want the user to receive messages as they are progressing through the form.

       

      event.rc = true;

      if (event.value != "")

      {

          app.alert("A GIVEN NAME MUST BE ENTERED IN THIS FIELD");

          event.rc = false;

      }

       

      Thanks all for taking the time to look!!