In this tutorial, learn how to create a hidden form field in a fillable PDF form that keeps the field hidden from your recipients. Suppose you're working on a PDF form, and you want to calculate a surcharge or tax to add to a total, but you don't want users trying to type into the field. In this quick tip, learn how you can take care of the problem by hiding the field in the PDF form. The next time you need to calculate something in your PDF form using a constant value, try using a hidden field.
Donna Baker February 6, 2012
Suppose you're working on a PDF form, and you want to calculate a surcharge or tax to add to a total, but you don't want users trying to type into the field. You can take care of the problem by hiding the field in the PDF form.
A typical order form often uses a hidden field to calculate sales tax. Each product row has fields to enter costs and amounts to produce row totals. Then there's a subtotal field that adds up all the product lines.
Now comes the hidden field to provide the amount of tax, which is also a regular text field with a couple of extras. Double-click the field to open its properties. On the General tab, click the Form Field drop-down arrow and choose Hidden. If you plan to print your form, you might want to choose Hidden but Printable instead so you can see the value used in the calculation.
You don't need a tooltip as your user won't see the field anyway. For the same reason, you don't need to select anything on the Appearance tab. In the Options tab, type the default value you want Acrobat to use for calculating, such as .07 for a 7% tax. Then click the Format tab and pick Numbers from the drop-down list. To use a percentage expressed as a decimal value, leave the default 2 decimal places.
Now your field has a set value to use for other calculations. For example, to calculate a 7% tax for a product order, open the dialog box for the visible Sales Tax field. On the Calculate tab, multiply the subtotal by the Tax field to produce the value shown for the sales tax.
The next time you need to calculate something in your form using a constant value, try using a hidden field.
|Acrobat XIAcrobat X|
|Convert existing forms to fillable PDFs fill and sign PDF online|
Try Acrobat DC
Get started >
Post, discuss and be part of the Acrobat community.
Join now >