How to use subtraction in PDF forms

By December 13, 2011


Acrobat X and XI have a set of predefined calculations you can use to perform various math functions within fillable PDF form fields. This short tip shows you how to create a PDF form field that performs the math function for subtraction in fillable PDF forms.

View transcript

How to use subtraction in PDF forms

Lori KassubaDecember 13, 2011

Acrobat X Std. and Pro, both have a set of predefined calculations that you can use to perform various math functions within form fields. You can view these by opening up the Tools pane, Forms panel, and clicking on the Edit command. If I double-click on my ExpenseTotal field, and then open up the Calculate tab. You can see that this field uses the predefined sum calculation. Unfortunately, subtraction is not a predefined calculation, so you’ll need to either use Simplified field notation or a custom JavaScript calculation. I’ll review how you can use Simplified Field Notation to perform subtraction. Simplified field notation is just a scripting language based on a syntax that's similar to the formulas that are written in a spreadsheet program.

So, to subtract two form fields, open the properties for your form field. Click on the Calculate tab, then click the Simplified field notation radio button and select the Edit button. Type the first field name minus the second field name in the JavaScript editor. In this case, I’m subtracting ExpenseTotal – TotalAdvance. Then when I click OK in the JavaScript editor and close the Properties dialog, and click the Preview button, you can see how the two fields are automatically subtracted from each other. Remember that you cannot use hierarchical form field names or spaces when using Simplified field notation.

Was this tutorial helpful?

Please Log in to provide feedback on this tutorial.

Rate this tutorial

Please Log in to rate this tutorial.


Did you know?

  • You can ask a question and get an answer from one of our experts.
  • You can search our database of over 800 tutorials by product and/or topic.
  • You can leave a comment below for the author of this tutorial.

Products covered:

Acrobat X ProAcrobat X StandardAcrobat X Suite

Related topics:

Create and analyze forms

Top Searches:

HTML forms, Online forms, Web forms, Online form builder


Leave a reply:

Have an urgent question? Post your question to our Ask an Expert forum for a faster response.

Commenting is not available in this channel entry.

Acrobat XI trial

Get the trial now

Learn how to
edit PDF.

Get started