In this tutorial, learn how to create a fillable PDF form field that performs the math function for subtraction in fillable PDF forms. Acrobat X and XI have a set of predefined calculations you can use to perform various math functions within fillable PDF form fields.
Lori Kassuba December 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.
Products covered: |
Acrobat XIAcrobat X |
Related topics: |
PDF Forms |
Top Searches: |
Convert existing forms to fillable PDFs fill and sign PDF online |
Try Acrobat DC
Get started >
Learn how to
edit PDF.
Post, discuss and be part of the Acrobat community.
Join now >
0 comments
Comments for this tutorial are now closed.
Comments for this tutorial are now closed.