PDF Editing Issues

Make a PDF Text Field Required When Three Dropdowns Say Yes

Olivia MillerOlivia Miller Nov 18, 2026 869 views

Question details

Make a PDF text field visible and required only when three dropdown fields are all set to Yes.

Make a PDF Text Field Required When Three Dropdowns Say Yes
Product
PDF form editor, such as Adobe Acrobat Pro
Device & OS
not provided
Scenario
A PDF form has three dropdowns and a text field that should appear only when all three answers are Yes.
Observed behavior
The text field should be visible and required when all three dropdowns equal Yes; otherwise, it should be hidden and optional.
Before you start

Open the PDF in a form editor that supports Acrobat JavaScript, such as Adobe Acrobat Pro. Check the exact field names and the export value for each Yes option; the script must match those values.

Solution 1Recommended

Use an Acrobat calculation script to control the text field

Use this approach when the PDF will be completed in a viewer that supports Acrobat form JavaScript.

The script checks all three dropdowns whenever the form recalculates. It makes the text field visible and required only when every dropdown has the value Yes.

1
Open the form editor

In Adobe Acrobat Pro, open the PDF and select All tools > Prepare a form.

2
Check the dropdown values

Open each dropdown's Properties and check its field name and the export value for the Yes option. The example uses Dropdown1, Dropdown2, Dropdown3, and Yes; replace them in the script if your form uses different names or export values.

3
Add the calculation script

Open the target text field's Properties, select Calculate > Custom calculation script, and click Edit. Enter: var a = this.getField("Dropdown1"); var b = this.getField("Dropdown2"); var c = this.getField("Dropdown3"); var allYes = a && b && c && a.valueAsString === "Yes" && b.valueAsString === "Yes" && c.valueAsString === "Yes"; event.target.required = !!allYes; event.target.display = allYes ? display.visible : display.hidden;

4
Test the form

Close the field properties, select Preview, and try every combination of dropdown values. Confirm that the text field appears and is required only when all three values are Yes.

Use an Acrobat calculation script to control the text field
Viewer and submission support: The script requires a PDF viewer that supports Acrobat form JavaScript and has it enabled. The required flag is typically checked during form submission; it does not necessarily prevent someone from saving a PDF with the field empty.
Free Microsoft Office alternative

Review PDF Forms and Office Files with WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with PDF and Microsoft Office files. Open compatible files in WPS for an easy transition, but use an Acrobat JavaScript-compatible editor and viewer for the conditional form behavior described above.

Open and review PDF forms alongside other documentsCompatible with Microsoft Office formats including DOCX, XLSX, and PPTXFamiliar editing interface for a smooth transition from Microsoft OfficeFree, lightweight Office alternative
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't the field appear when all three dropdowns show Yes?

In Prepare a form, check that the script uses the exact dropdown field names and Yes export values. Also confirm that form JavaScript and automatic field calculation are enabled in the PDF viewer.

Does the script erase the text when the field is hidden?

No. The script changes the field's visibility and required status but leaves its existing value intact.

Will the required setting stop users from saving an incomplete PDF?

Not necessarily. Required fields are generally checked when a form is submitted, and enforcement depends on the viewer and submission method.

Can I use this form in any browser PDF viewer?

Not all browser PDF viewers support Acrobat form JavaScript. Test the completed form in the viewer your recipients will use, or use an Acrobat viewer with JavaScript enabled.