Don't Print / Only Print

Control which components appear when a form is printed, on paper or to PDF from the browser. For example, hide the Submit button from printouts, or add text that appears only on paper.

Hide a component when printing

GlobalForms has a built-in no-print class:

  1. Open the component's settings and go to the Display tab.

  2. Enter no-print in Custom CSS Class.

  3. Save the component, then print the form from its view link to check the result.

The Custom CSS Class box containing no-print
Custom CSS Class set to no-print

Show a component only when printing

There is no built-in class for this, but you can add one to the form:

  1. Add an HTML Element to the form. Set HTML Tag to div and enter this in Content:

    CSS
    <style>
      .print-only { display: none; }
      @media print { .print-only { display: block !important; } }
    </style>
    
  2. On each component that should appear only on paper, enter print-only in Custom CSS Class.

  3. Save the form and print it to check.

The style applies only to the form it's added to. See Using Custom CSS.