Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > Adobe Acrobat and PDF

  • Print
  • + Share This
From the author of Setting the “Wakeups Charge” Calculation

Setting the “Wakeups Charge” Calculation

If we double-click on the Wakeups Charge field, Acrobat shows us the Text Field Properties dialog box for the field (Figure 6). This dialog box dictates the appearance and behavior of the field; we’re going to use its Calculate tab (Figure 7) to specify that the field should calculate its own value and to tell it exactly how it should do so.

Figure 6 The Text Field Properties dialog box lets us specify the appearance and behavior of a form field.

Figure 7 We’re interested in the Calculate tab, where we can tell Acrobat that the form field should calculate its own value.

Acrobat makes it surprisingly convenient to specify a field’s calculation; in effect, we construct an English sentence that describes the computation. In our case, that sentence will be “The value is the product of the following fields: Wakeups Count; Wakeups Rate.”

Couldn’t be clearer.

We assemble this sentence with a radio button, a pop-up menu, and a text box (Figure 8). Here’s the procedure, step by step.

Figure 8 Using these controls, we assemble an English sentence that describes how the form field should be calculated.

  1. Select the “Value is the…” radio button; this enables the other two controls we need.
  2. Select “product” in the pop-up menu.
  3. Acrobat now knows it needs to multiply the values of the fields listed in the text box. We could just type the field names into the text box with our keyboard, but I’m pretty thumb-fingered; I’d have to retype each name at least twice to get it right. It’s much easier to choose the fields from a list.

  4. Click the Pick button and select the fields you want (Wakeups Count and Wakeups Rate, in our case) in the resulting list (Figure 9).
  5. Figure 9 The easiest way to specify the form fields that should be used in the calculation is to pick them from the list. You could just type the names into the text field, but why ever would you want to?

  6. Click the OK button. Acrobat will add the selected form fields to the calculation text box (Figure 10).
  7. The dialog box now describes our calculation in English; click the Close button to tell Acrobat you’re finished with the dialog box. (Idle question: Why isn’t this an OK button, as it is practically everywhere else? Just because, I expect.)

    Figure 10 When you are finished specifying the calculation, click the Close button.

  8. Click on the Close Form Editing button in the Forms panel (Figure 11) to leave the Form Editor and return to normal mode.

We’re done! We can now see our functioning calculated form field in all its majesty (Figure 12). Put any value into the Count field, press the Tab key to leave the field, and the total charge will recalculate itself to reflect the new value.

Figure 11 Click the Close Form Editing button to return to Normal mode.

Figure 12 Our Charge field now recalculates itself, based on the number of wake-up calls and the rate. Cool!

So far, so impressive. However, we’re not quite done; we can still improve the “Standard Wake-ups” part of the form.

  • + Share This
  • 🔖 Save To Your Account