How to Keep Acrobat Form Fields Hidden When Printing
Question details
The user needs to understand why PDF form fields intended to be hidden during printing revert to visible, and how to maintain the correct display properties.

- Product
- PDF Form Editor
- Device & OS
- not provided
- Scenario
- Clicking a button or executing a form action on a PDF document with fields designated to be hidden when printed.
- Observed behavior
- Form fields set to “Visible but hidden when printed” unexpectedly revert to “Visible” on printed pages after a button action or script runs.
Before modifying form properties, save a backup copy of your original PDF document and ensure you have access to the JavaScript editor within your PDF application.
Review and Update JavaScript Display Properties
Identify if a button's JavaScript action is overriding the field's display state, and update the script to maintain the non-printing status.
When an action or script executes on a PDF form, it can dynamically change field properties. If a script explicitly sets a field to 'visible', it will overwrite the 'Visible but hidden when printed' setting.
Open your PDF document and activate the Prepare Form tool to view all interactive elements.
Right-click the specific button or field that triggers the error and select Properties from the context menu.
Navigate to the Actions tab and look for any 'Run a JavaScript' actions associated with the Mouse Up or click events.
Edit the script to ensure the target field is set using the correct display property. To keep it visible on screen but hidden when printing, use 'display.noPrint' instead of 'display.visible'.

Create Form Fields Directly in Your PDF Editor
Avoid inheritance issues by creating fields natively instead of relying on those imported from design software.
Manage PDF Form Properties with WPS Office
WPS Office includes a comprehensive, user-friendly PDF editor. You can easily create, manage, and configure PDF form fields—including setting them to be hidden during printing—without dealing with complex JavaScript conflicts.
- 1. Open your PDF: Launch WPS Office and open the PDF document that requires form field adjustments.
- 2. Navigate to Form tools: Click on the Form tab on the top ribbon to reveal the interactive form field editing options.
- 3. Edit field visibility: Double-click the target field to access its properties, then adjust its visibility settings so it will not appear on printed pages.
- 4. Test via Print Preview: Press Ctrl+P (or Cmd+P on Mac) to open the print preview and confirm the field is successfully hidden.

Frequently Asked Questions
Why do my PDF form fields print even when set to hidden?
This typically occurs because a button action or an underlying JavaScript event runs and overrides the default field properties, automatically resetting the field's display state back to fully visible.
What is the correct JavaScript code to hide a field when printing?
To ensure a field is visible on the screen but hidden on the physical printout, set the field's display property using the script: `getField("FieldName").display = display.noPrint;`.
Does importing forms from InDesign cause PDF scripting issues?
Yes, PDF fields generated during an InDesign export can retain complex legacy properties that may conflict with manual script configurations. Deleting and recreating the field directly in your PDF editor often resolves these conflicts.
How can I quickly verify if a field is hidden before actually printing?
You can confirm your settings without wasting ink by opening the Print dialog. The print preview window dynamically renders exactly what elements will be pushed to the printer, accurately reflecting any hidden field rules.




