Send this page




Can I Reset some form fields without resetting all of them?

Dear Lori,

I have a PDF form with multiple fields. I have created a "reset" button, but only want to reset some of the fields. Is this possible? If so, can you give an example?

— Ruth, Georgia

Lori responds,

Hi Ruth,

Since there are two types of PDF forms — forms created with the Acrobat tools, and forms created with Adobe LiveCycle Designer — I'll give two examples that show how this can be done.

Acrobat forms:

  • Select the action “Reset a form,” and then select the individual fields to be reset in the Reset a Form dialog box.
  • In Figure 1, the form has three fields, but the button only resets the field “Name.”


Figure 1: From the Reset a Form dialog box select only the fields that should be reset.
Zoom imageSee larger image



LiveCycle forms:

  • In order to reset individual fields, you must add some JavaScript to the button object.
  • On the mouseUp or Click event, add xfa.host.resetData("[field name]") For example, if you look at Figure 2, to reset the field “Name,” you would add xfa.host.resetData("F.P1.Name") that explicitly identifies the field as part of Form “F,” page “P1,” field “Name.”


Figure 2: Add JavaScript to the reset button to specify which fields to reset.
Zoom imageSee larger image


— Lori





<< Back to Dear Lori main menu.


<< Back to Lori's Corner main menu.

AcrobatUsers.com  >>  User Groups • News • Events • Articles • Blogs • How To • Resources • Member Log in