How to Fill Out PDF Form Input Fields
Introduction
PDF forms (AcroForms) are widely used in government, business, and HR workflows. They contain interactive input fields—such as text boxes, checkboxes, radio buttons, and dropdowns—that can be filled automatically using structured data files like XML (often in XFDF format).
In this tutorial, you’ll learn how to map common PDF form field types to values in a data file and fill them programmatically using the pdfRest Import Form Data API tool.
We’ll cover:
- Text fields (single-line and multiline) → mapped to string values
- Checkboxes → controlled by a form-specific export value (not standardized)
- Radio buttons → a single selected value from a group (also export-value-based)
- Dropdowns and list boxes → mapped to selected option values (display or export value)
- Signature fields → require special handling (not simple text values)
We’ll also examine how these values appear when exported to XML (XFDF), and how to use that structure to populate forms programmatically.
⚠️ Important Concept: Field Values Are Form-Specific
Before diving into examples, it’s critical to understand:
Many PDF form field values are not standardized. They are defined by the form creator.
This applies especially to:
- Checkboxes
- Radio buttons
- Dropdowns
These fields rely on export values—internal values embedded in the PDF that must be matched exactly when importing data.
✅ Recommended workflow
- Fill out your PDF form manually
- Export the form data using the pdfRest Export Form Data API tool
- Inspect the resulting XML/XFDF
- Use those exact field names and values when constructing your data file
⚠️ Do not assume values like"Yes","On", or"True"will work unless confirmed via export.
Sample Forms Used
Examples in this tutorial are based on the following sample forms:
All field/value examples shown below were obtained by:
- Filling out these forms manually
- Exporting their data using the pdfRest Export Form Data API tool
⚠️ These values are specific to these example forms and may differ in your own PDFs.
Field Type Mappings (with XML Examples)
1. Text Field
Single-line or multi-line text fields store plain string values.
AcroFormImport
<FirstMiddleLastNamemax29characters>Your Name</FirstMiddleLastNamemax29characters>
<BusinessEmailAddress>Business Email</BusinessEmailAddress>
<ResidentialStreetAddressnoPOBoxduetoUSAPATRIOTActVerification>Your Address</ResidentialStreetAddressnoPOBoxduetoUSAPATRIOTActVerification>
<MothersMaidenName>Mother's Maiden Name</MothersMaidenName>
<SSN>Your SSN</SSN>SampleForm
<name>Name</name>→ Text field (single-line, e.g., user’s name)<comments>Comments</comments>→ Multiline text field (comment box)<password>password</password>→ Password field (simulated as a text field)
2. Password Field
A password field is technically just a text field with a masking flag in the PDF viewer.
<password>password</password>3. Checkbox
Checkbox values are not standardized. They depend on the field’s export value, which is defined inside the PDF.
Example 1 (uses "On"/"Off")
<Owner>On</Owner>
<Corporation>Off</Corporation>
<LLC>Off</LLC>
<SoleProp>On</SoleProp>
<Partnership>Off</Partnership>
<Owner>On</Owner>
<Partner>Off</Partner>
<Member>Off</Member>Example 2 (uses "Yes"/"Off")
<subscribe_news>Yes</subscribe_news>
<subscribe_announcements>Off</subscribe_announcements>Example 3 (numeric values)

In this example, the data file field looks like:
<c1_1>2</c1_1>Where 2 is considered "No" and 1 is considered "Yes".
<c1_1>1</c1_1> <!– Checked -->
<c1_1>2</c1_1> <!-- Unchecked -->🔑 Key takeaway
A checkbox is checked only when the value matches its export value exactly.
4. Radio Button Group
Radio buttons behave similarly to checkboxes:
- Only one option is selected
- The stored value must match the option’s export value
<gender>female</gender>⚠️ The value (female) is defined by the form—not guaranteed to match the visible label.5. Drop-down (Combo Box)
Dropdowns store either:
- The display text, or
- The export value (if defined)
<state>TX</state>⚠️ Always confirm via export whether the field expects display text or an internal value.
6. List Box
List boxes may allow single or multiple selections.
<fruit>Banana</fruit>For multi-select fields, multiple values may appear depending on the export format.
7. Signature Field
Signature fields do not behave like standard input fields.
<signature>Signature</signature>- Exported values are typically placeholders
- You cannot reliably populate a valid signature using simple XML
- Proper handling requires a digital signing process with certificates
8. Buttons (Submit, Reset, Print)
Buttons do not store values and typically do not appear in exported data:
<field name="SubmitButton"/>⚠️ Troubleshooting Common Issues
Checkbox not checking
- Value does not match the field’s export value
- Solution: export a filled form and copy the exact value
Field not populating
- Field name mismatch
- Case sensitivity matters
Dropdown not selecting correctly
- Using display value instead of export value (or vice versa)
Radio button not selecting
- Value does not match the option’s export value
Using the Data with pdfRest
Once your XML/XFDF data file is correctly structured:
- Verify field names and values match exported data
- Submit the data using the pdfRest Import Form Data API tool
- Confirm results in the output PDF
Beyond the Tutorial
In this tutorial, we covered how PDF form fields map to XML values and how to use exported data to reliably populate forms. This is key for understanding the output from the pdfRest Export Form Data API tool, and how to use data files to use the pdfRest Import Form Data API tool properly.
For implementation examples:
- Visit the code samples in our GitHub repository
- Try the tools in the API Lab
- Review full API documentation