PDF Editing Issues

Make Ten Adobe Acrobat Form Percentages Add Up to 100

Natalie TaylorNatalie Taylor Nov 19, 2026 868 views

Question details

Make sure ten objective percentages in an Acrobat form total 100 percent.

Make Ten Acrobat Form Percentages Add Up to 100
Product
Adobe Acrobat
Device & OS
not provided
Scenario
A form collects or calculates percentages for ten objectives and must check the combined total before submission.
Observed behavior
The desired result is a total of 100 percent, with an error shown if the values do not meet the requirement.
Before you start

Decide whether users will enter the ten values or other form calculations will populate them, and whether every field is mandatory. The example below requires all ten fields and treats entries as percentage points: enter 25 for 25%, not 0.25.

Solution 1Recommended

Calculate the total and validate it before submitting the Acrobat form

Use a calculated total field and a scripted submit button when all ten values must be present and add up to 100.

This example uses fields named Objective1 through Objective10 and a field named Total. It accepts values from 0 to 100 and checks the sum to two decimal places.

The validation only guards submission through the scripted button. Remove other submit actions that could bypass it, and test the form in the PDF viewer your users will use.

1
Name and format the fields

Open the PDF in Acrobat and choose All tools > Prepare a form. Name the ten text fields Objective1 through Objective10 and add a text field named Total. Use Number or no special format rather than Percentage format, and label the fields as percentages.

2
Calculate the total

Open Total field Properties, select Calculate > Custom calculation script, and click Edit. Enter: var sum = 0; for (var i = 1; i <= 10; i++) { var v = this.getField('Objective' + i).valueAsString; if (v !== '' && isFinite(Number(v))) sum += Number(v); } event.value = sum;

3
Add a guarded submit button

In Prepare a form, add a button and open its Properties > Actions. Select Mouse Up and Run a JavaScript, then add the script below. Replace https://example.com/submit with your actual form-processing endpoint, and do not add a separate Submit a form action to the button: var sum = 0; for (var i = 1; i <= 10; i++) { var v = this.getField('Objective' + i).valueAsString; if (v.trim() === '' || !isFinite(Number(v)) || Number(v) < 0 || Number(v) > 100) { app.alert('Enter a number from 0 to 100 in each objective field.'); return; } sum += Number(v); } if (Math.abs(sum - 100) >= 0.005) { app.alert('The objective percentages must total 100%.'); return; } this.submitForm({cURL: 'https://example.com/submit', cSubmitAs: 'PDF'});

4
Test the form

Close Prepare a form and enter test values. Click the submit button with a blank field, an incorrect total, and a valid total to verify the alerts and submission. If objective fields are calculated, check their calculation order in Prepare a form so they update before Total.

Calculate the total and validate it before submitting the Acrobat form
Viewer and submission requirements: PDF viewers differ in their support for Acrobat JavaScript and form submission. The endpoint must accept a submitted PDF. If blank objectives are allowed, change the validation rules to match your requirements.
Spreadsheet alternative

Check objective percentages in WPS Spreadsheet

If a spreadsheet is acceptable instead of an Acrobat PDF form, use WPS Spreadsheet to total ten entries and display whether they add up to 100. This does not add validation to the original PDF form.

  1. 1. Create a worksheet: Open WPS Spreadsheet, choose New, and create a blank workbook.
  2. 2. Enter the objectives: List the ten objectives in cells A2:A11 and enter their percentage-point values in B2:B11, using 25 for 25%.
  3. 3. Calculate the total: Select B12 and enter =SUM(B2:B11) to display the combined percentage-point total.
  4. 4. Add a status check: Select B13 and enter =IF(COUNT(B2:B11)<10,"Enter all 10 values",IF(ABS(SUM(B2:B11)-100)<0.005,"Valid","Total must equal 100")) to check that all ten cells contain numbers and the total rounds to 100.
Checks ten objective percentages with a formulaShows a clear status when entries are missing or the total is incorrectCompatible with Microsoft Excel XLSX filesProvides a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Can Acrobat validate percentages that are calculated automatically?

Yes. Use the calculated objective fields in the total and validation scripts. In Prepare a form, check the field calculation order so the objective values update before the Total field.

What if some objective fields can be left blank?

Decide whether a blank should count as zero, then modify the submit script to skip blank fields instead of showing an error. Keep the total check so the completed values must still add up to 100.

Why does the example ask users to enter 25 instead of 0.25?

The scripts use percentage points and compare their sum with 100. Do not apply Acrobat's Percentage format to these fields without adjusting and testing how values are stored and displayed.

Will the submit-button check work in every PDF viewer?

Not necessarily. Some viewers restrict or do not support Acrobat JavaScript or PDF form submission. Test the form in the intended viewer and ensure users cannot submit through another, unvalidated button.