PDF Editing Issues

How to Hide Form Buttons When Sending a PDF by Email

Kushani NimanthikaKushani Nimanthika Nov 2, 2026 869 views

Question details

The user needs to keep internal-use website link buttons visible during editing but automatically hide them when the fillable PDF form is submitted or emailed.

How to Hide Form Buttons When Sending a PDF by Email
Product
PDF
Device & OS
not provided
Scenario
Submitting or emailing a fillable PDF form that contains internal instructional or link buttons meant only for the author's use.
Observed behavior
Internal-use buttons currently remain visible when the form is submitted or sent as an email attachment, whereas they should be hidden from the final recipient.
Before you start

Before applying JavaScript changes, ensure you test the workflow on a copy of your original fillable PDF, as the hidden state may be permanently saved with the submitted file.

Solution 1Recommended

Use a JavaScript Action on the Submit Button

Attach a script to your main 'Submit' button so that it automatically hides all designated internal buttons right before the email or submission action is triggered.

By binding a script directly to the submission button, you ensure that the internal buttons are only hidden exactly at the moment the document is finalized and sent off.

1
Open PDF in Form Editing Mode

Open your fillable PDF in a PDF editor that supports form editing and JavaScript execution.

2
Access Submit Button Properties

Right-click the 'Submit' or 'Email' button and select 'Properties' from the context menu.

3
Add JavaScript Action

Navigate to the 'Actions' tab, select 'Run a JavaScript' from the 'Select Action' dropdown, and click 'Add'.

4
Enter the Hide Script

Enter the JavaScript code snippet (e.g., `this.getField("YourButtonName").display = display.hidden;`) for each button you want to hide, placing this code before the actual submission command.

5
Test the Workflow

Click 'OK', close the properties dialog, and test the button on a duplicate file to ensure it hides the specified elements before submitting.

Use a JavaScript Action on the Submit Button
Print Settings Alternative: If you only need to hide the buttons on physical printouts rather than digital emails, you can simply open the button Properties and set the Form Field to 'Visible but doesn't print' under the General tab.
Comprehensive PDF Form Editor

Easily Manage PDF Forms and Document Properties with WPS Office

WPS Office provides robust PDF editing tools that allow you to fill, edit, and manage PDF forms seamlessly. You can easily adjust form properties, flatten documents before sending, and ensure your files look perfect for recipients without complex scripting.

  1. 1. Open the Fillable PDF: Launch WPS Office and open your fillable PDF document.
  2. 2. Access Form Tools: Click on the 'Form' or 'Edit' tab to access document management tools.
  3. 3. Adjust or Delete Internal Elements: Select the internal-use form fields or buttons to easily delete or adjust them before sending.
  4. 4. Save and Email: Save a clean final copy of the PDF and use the built-in share feature to email it directly to your recipients.
Fully compatible with standard PDF form fields and interactive elements.Easily edit, annotate, and manage PDF documents in a highly intuitive interface.Save, export, and flatten files with high fidelity to share safely via email.
microsoft office alternative - wps office

Frequently Asked Questions

Can I just set the buttons to not print instead of using JavaScript?

Yes. If your only concern is the printed copy, you can right-click the button, go to Properties, and under the General or Appearance tab, set the form field to 'Visible but doesn't print'. However, this will not hide the buttons in the digital file sent via email; recipients will still see them on their screens.

Will the hidden buttons reappear if the recipient sends the PDF back?

If you use a JavaScript action triggered on submit to change the display property to hidden, the buttons will generally remain hidden in the saved version of the PDF unless another script is explicitly written to unhide them.

Do all PDF readers support JavaScript actions for hiding buttons?

No. Some basic PDF viewers, web browser PDF plugins, or default mobile OS viewers may not fully support PDF JavaScript. It's highly recommended to test your form logic using standard, fully-featured PDF software to ensure scripts execute correctly.