PDF Forms
PDFMonkey can generate interactive PDF forms (AcroForms) by detecting special markers in your template and converting them into fillable form fields.
Overview
When you enable the PDF forms feature in your template settings, PDFMonkey automatically detects markers in your HTML content and replaces them with interactive form fields in the generated PDF. This allows you to create forms that can be filled out directly in PDF readers like Adobe Acrobat or Preview.
Enabling PDF Forms
To enable PDF forms in your template:
Go to your Template settings
Enable the "PDF Forms" option (similar to enabling JavaScript or Emojis)
Add form field markers to your template content
When enabled via the API, set use_forms: true in your template's settings or settings_draft object.
Marker Syntax
Markers follow a specific syntax that tells PDFMonkey what type of field to create and how to configure it:
[% data_form_field_TYPE_NAME_OPTIONS %]Required Elements
[%and%]- Start and end delimitersdata_form_field- Required prefix for detectionTYPE- Field type (text, checkbox, dropdown, etc.)
Optional Elements
NAME- Custom field name (e.g.,firstname,email)OPTIONS- Dimensions, validation, alignment, etc.
Basic Examples
Field Types
Text Fields
Single-line Text
Use for: Names, addresses, phone numbers, short text
Multi-line Text (Textarea)
Use for: Comments, descriptions, long messages
Password Field
Use for: Passwords, PINs, sensitive information
Email Field (with validation)
Use for: Email addresses
Phone Field
Use for: Phone numbers
Selection Fields
Checkbox
Use for: Terms acceptance, yes/no options, multiple selections
Example in template:
Dropdown (Select)
Use for: Country lists, department selection, multiple choice (single selection)
Important: You must specify all options in the marker using options[A,B,C]
Radio Buttons
Use for: Exclusive choices (gender selection), single option among several
Note: Radio buttons with the same name form a group
Specialized Fields
Number Field
Use for: Age, quantities, amounts, scores
Date Field
Available formats:
format_dd_mm_yyyy- DD/MM/YYYY (European)format_mm_dd_yyyy- MM/DD/YYYY (USA)format_yyyy_mm_dd- YYYY-MM-DD (ISO)
Comb Field (for codes)
Use for: Postal codes, serial numbers, verification codes
Appearance: Each character has its own visual box
Borderless Fields (noborder / invisible)
Use for:
Elegant forms: Fields without black rectangles, with manually drawn dotted guide lines
Invisible metadata: Tracking, references, user IDs
Pre-filled values: Invisible but editable default values
Clean design: Alternative to classic borders
Features:
✅ Border: 0 (invisible)
✅ Background: Transparent (shows content underneath)
✅ Functional: Captures text normally
✅ Compatible: All field types (text, checkbox, dropdown, etc.)
Advanced technique - Dotted guide lines:
To create elegant writing lines, combine:
Marker in WHITE on white background (invisible to the eye)
Manually drawn dotted lines at the base of the field
noborderoption to make the field transparent
Example in your design software:
Result:
White marker is invisible in the PDF
Dotted lines guide the user
Generated field is transparent and functional
Complete examples:
Field Options
Dimensions
Required for proper rendering:
Examples:
Size Guide:
Short name
150-250px
30px
300-400px
30px
Address
400-500px
30px
Textarea
400-600px
80-150px
Checkbox
20px
20px
Dropdown
200-300px
30px
Date
120-150px
30px
Number
60-100px
30px
Field State
Examples:
Constraints
Examples:
Alignment and Style
Examples:
Default Values
Examples:
Custom Field Names
The first unrecognized element becomes the field name:
Benefits:
Clearly identifies the field
Facilitates data processing
Improves readability
Naming conventions:
Use snake_case:
first_name,email_addressBe descriptive:
user_emailrather thanemail1Avoid special characters
Complete Examples
Simple Contact Form
Registration Form
Elegant Form with Borderless Fields
Technique to create this template:
In Word/InDesign/Canva:
Write the markers at field locations
Set marker text color to WHITE (invisible)
Manually draw dotted lines under the fields
Dotted lines remain visible, markers disappear
Result after processing:
Transparent AcroForms fields (
noborderoption)Visible dotted lines to guide the user
Clean design without black rectangles
Functional in all PDF readers
Common Errors and Solutions
Marker Not Detected
Problem: The marker remains visible in the final PDF
Solutions:
Check the prefix
data_form_fieldCheck the delimiters
[%and%]No line breaks within the marker
Field Mispositioned
Problem: The field overflows or is offset
Solutions:
Adjust the
wandhdimensionsEnsure there's enough space in the template
Align the marker properly in your design
Dropdown/Radio Without Options
Problem: The field is not created
Solution: Add options[...]
Best Practices
Start simple: Test with 2-3 fields before creating a complete template
Name your fields: Use descriptive names for easier data processing
Test in preview: Always preview your template before generating documents
Use default values: Pre-fill common fields to facilitate input
Align for readability: Align your fields for a professional appearance
Provide adequate spacing: Ensure markers have enough space around them
Document your fields: Keep a list of used fields and their purpose
Hide markers visually: To prevent markers from being visible under the form fields in the generated PDF, set the marker text color to match your background color (e.g., white text on white background). The form field will render on top, but any visible marker text won't show through.
Create elegant forms with borderless fields: Combine
noborderoption + white marker text + manually drawn dotted lines for a professional, clean design without visible form rectangles.Mix border styles strategically: Use classic borders for important required fields and borderless fields for secondary or optional information to create visual hierarchy.
Limitations
Signature fields are not currently supported as interactive form fields
Complex field validation beyond basic types (email, phone) is limited
Fields work best with PDF Engine v5
See Also
API Reference - Templates - Complete API documentation for template settings
Styling your documents - Learn how to style your forms
Last updated
Was this helpful?
