PDF Editing Issues

How to Mark a PDF Form Complete When Checkboxes are Yes or N/A

Chanuka GeekiyanageChanuka Geekiyanage Nov 5, 2026 869 views

Question details

The user needs a PDF form text field to automatically display the word 'Complete' only when every item in a checklist is marked as either 'Yes' or 'N/A'.

How to Mark a PDF Form Complete When All Check Boxes Are Yes or N/A
Product
PDF
Device & OS
not provided
Scenario
Creating an interactive PDF review checklist where users select from Yes, No, or N/A options, and determining overall completion status based on those selections.
Observed behavior
The form requires a script to validate multiple mutually exclusive checkboxes and dynamically output 'Complete' based on the specific export values selected.
Before you start

Ensure your PDF editor supports JavaScript for interactive forms and that all checkbox fields have logically grouped names and standardized export values before writing the calculation script.

Solution 1Recommended

Use a Custom Calculation Script with Export Values

Apply standardized export values to your checklist checkboxes and use a custom JavaScript calculation on your target text field to automatically determine the completion status.

To make this work dynamically, your checkboxes must be named sequentially (e.g., 'Check Box1', 'Check Box2') and configured to act like mutually exclusive options for each row.

By looping through the checkbox export values, the script counts how many rows satisfy the 'Yes' or 'N/A' criteria and compares that against the total number of questions.

1
Configure Checkbox Names and Export Values

For each row in your checklist, group the checkboxes by giving them the exact same name (e.g., 'Check Box1' for row one). Assign the export value 'Yes' to the Yes box, 'No' to the No box, and 'N/A' to the N/A box. Repeat this sequentially (e.g., 'Check Box2' for row two).

2
Create the Completion Text Field

Add a new Text Field to your form where you want the word 'Complete' to appear. Right-click the field and select 'Properties'.

3
Add the Custom Calculation Script

Navigate to the 'Calculate' tab in the Text Field properties. Select 'Custom calculation script' and click 'Edit'.

4
Enter the JavaScript Code

Input the following script: var total = 0; for (var i = 1; i <= 46; i++) { if (this.getField("Check Box" + i).valueAsString == "Yes" || this.getField("Check Box" + i).valueAsString == "N/A") total++; } if (total == 46) { event.value = "Complete"; } else { event.value = ""; }

5
Save and Test

Click 'OK' to save the script, close the properties window, and test your form. The field will display 'Complete' only when all fields are either Yes or N/A, and will remain blank if a single 'No' is selected.

Use a Custom Calculation Script with Export Values
Adjust the Script for Your Checklist: The number '46' in the provided script represents the total number of questions. You must change '46' to match the exact number of checklist rows in your specific PDF form.

Manage and Fill Interactive PDF Forms with WPS Office

WPS Office provides a comprehensive PDF editing suite that allows you to seamlessly interact with, edit, and manage advanced PDF forms, including complex review checklists, without needing expensive third-party applications.

  1. 1. Open your PDF form: Launch WPS Office and open your interactive PDF checklist document.
  2. 2. Fill checkboxes easily: Click directly on the checkboxes to select 'Yes', 'No', or 'N/A' as required by your review process.
  3. 3. View automated results: Allow the built-in PDF engine to execute background calculation scripts and dynamically update your completion fields.
Easily view, fill, and interact with dynamic PDF forms.Fully compatible with standard PDF features, export values, and scripts.Cross-platform support ensures your checklists work on Windows, Mac, and mobile devices.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my PDF form calculation script not displaying 'Complete'?

Ensure that the field names in your script exactly match the names of your checkboxes (including spaces and case sensitivity). Also, verify that the export values on the checkbox properties are strictly set to 'Yes' and 'N/A' without any trailing spaces.

How do I make the Yes, No, and N/A checkboxes mutually exclusive?

To prevent a user from selecting 'Yes' and 'No' simultaneously on the same row, assign all three checkboxes in that row the exact same Field Name (e.g., 'Check Box1'), but assign them different Export Values ('Yes', 'No', 'N/A') in the Options tab of their properties.

Can I use text values other than 'Yes' or 'N/A'?

Yes. If your checklist uses different terminology, such as 'Pass' or 'Exempt', simply change the export values in the checkbox properties to match your terms, and then update the specific text string inside the quotation marks in your JavaScript.