How to Clear an Adobe PDF Form After Submission Automatically
Question details
The user needs a method to automatically reset all form fields to their default or empty state immediately after a user submits the PDF form via email.
- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Creating a fillable PDF form that needs to be cleared automatically after the user clicks the email submit button.
- Observed behavior
- The PDF form retains the user-entered data after submission, requiring a custom script to automatically reset the fields for the next user.
Ensure you have the necessary permissions to edit the interactive elements of the PDF document and access to the form's button properties to add custom JavaScript actions.
Use Acrobat JavaScript to Submit and Reset Form Fields
Add custom JavaScript code to your submit button that executes both the email submission command and the form reset command sequentially.
By utilizing Acrobat JavaScript, you can chain multiple commands together on a single button click. This ensures that the form data is first sent to the specified email address, and immediately afterward, all fillable fields are wiped clean.
Open your PDF in Adobe Acrobat, enter 'Prepare Form' mode, right-click on your existing Submit button, and select 'Properties'.
Navigate to the 'Actions' tab. Select 'Run a JavaScript' from the 'Select Action' dropdown menu and click 'Add'.
In the JavaScript Editor window, enter the following code: this.submitForm({cURL: "mailto:me@server.com", cSubmitAs: "PDF"}); this.resetForm();
Click 'OK' to save the script, close the properties dialog, and click the button in preview mode to verify that it opens the email client and clears the form.

Easily Manage and Reset PDF Forms with WPS Office
WPS Office provides a comprehensive suite of PDF tools, allowing you to easily view, fill, edit, and manage interactive PDF forms without needing complex scripting.
- 1. Open PDF Form in WPS Office: Launch WPS Office and open your fillable PDF document.
- 2. Fill or Review Data: Click on the interactive fields to enter your data or review form responses.
- 3. Clear Form Fields: To quickly reset the form manually, navigate to the 'Form' tab and select the 'Clear Form' option to instantly remove all user-entered data.

Frequently Asked Questions
Can I reset only specific fields instead of the entire PDF form?
Yes. In your JavaScript, you can modify the reset command to target specific fields by passing an array of exact field names. For example: this.resetForm(["FieldName1", "FieldName2"]);
Why isn't the JavaScript submit function sending the email?
This typically happens if the user's default desktop email client (like Outlook or Apple Mail) is not configured properly. The mailto: command relies on the local system's default mail application to generate the outgoing message.
Does clearing the form delete the document itself?
No. Resetting or clearing the form only removes the user-entered text or selections from the interactive fields. The original document structure, static text, and empty form fields remain completely intact.




