1 Reply Latest reply on Jul 30, 2015 1:12 PM by try67

    How to ensure blank fields don't print?

    kevind4890581

      I am making several fillable forms, and not all of the fields will always need to be filled in. I have default, "instructional" text in each field entering in the Custom Format Script section the following text: if(!event.value)event.value="DESIRED TEXT"

       

      Once someone has clicked into the field, that text disappears.

       

      Can I make it so that the default text will not print if nothing is entered?

       

      Thanks.

        • 1. Re: How to ensure blank fields don't print?
          try67 MVP & Adobe Community Professional

          (I moved your question to the Acrobat JavaScript forum)

           

          Yes, you can do it by setting the display property of the field to "Visible but doesn't print" when the default value is shown, and back to "Visible" when a different value is shown.

           

          So the code you posted should be adjusted to:

           

          if (!event.value) {

               event.value="DESIRED TEXT";

               event.target.display = display.noPrint;

          } else event.target.display = display.visible;