In some form applications, users may print (to paper or to PDF) a form in various states of completion. When printing, it may be desirable for certain components to be excluded from the print output. While purely aesthetic, controlling print output may be necessary for some use cases. For example, if a Submit button is present on a form, the user may not want the button in the printed output.
Don't Print Style
@media print { .no-print, .no-print * { display: none !important; } .print-only{ display: inline !important; } } .print-only{ display: none; }
Apply the style "no-print" to a component will ensure it is not part of any printed output. Optionally, the "print-only" style can be applied to elements that should only display when the form is printed.