1 Reply Latest reply on May 30, 2014 2:38 AM by try67

    How to set form field not to print if blank

    Naomi Kelly Level 1

      I have a form with a drop down menu with the default item reading "select one". I would like to not have this field print(just have a blank box) for individuals that prefer to print and hand write the form. I do still need the field to print if the user makes a selection and we print it later.

       

      Please let me know how this could be done.

       

      Thanks!

        • 1. Re: How to set form field not to print if blank
          try67 MVP & Adobe Community Professional
          Embed this code as the file's Will Print event (via Document - JavaScript - Set Document Actions):

           

          var f = this.getField("Enter field name here");
          if (f.value==f.defaultValue) f.display = display.noPrint;
          else f.display = display.visible;
          

           

          This will cause the field to become non-printable (but still visible) if the selected value is the default value. Otherwise it will switch back to visible and printable.