Add and configure template variables for dynamic document content.
Variables are placeholders in a template that accept different values for each document -- such as a recipient's name, email address, or answers to specific questions. When a document is created from the template, the variable placeholders are replaced with the actual values provided.
To add a variable to a PDF template:


For DOCX templates, there are two approaches:
{firstName})..docx file, add the variable placeholders in your desktop editor, then upload the updated file back to DocQ.
When naming variables, follow these rules:
_). No spaces, hyphens, or other symbols.firstName, companyAddress).After adding a variable, you can configure its properties by selecting it in the variables panel.

The available settings are:
| Setting | Description |
|---|---|
| Variable Name | The internal identifier. Use camelCase by convention. |
| Label | The display name shown to the user filling out the form. |
| Hide value | Controls visibility of the entered value: Display (shown normally), Hide (value hidden from view), or Hash (value masked with hash characters). |
| Hint | Tooltip text displayed to help the user understand what to enter. |
| Read only | When enabled, the user cannot modify this field. Useful for pre-filled values. |
| Required | When enabled, the field must be completed before the form can be submitted. |
| Positions | Defines where the variable value appears on the document. |
| Initial Value | A default value that pre-populates the field. |
DocQ supports a wide range of variable types to handle different kinds of input.
A single-line text input field for short values such as names, titles, or reference numbers.

An email address field with built-in format validation. When the confirmation toggle is enabled, the user must enter the email address twice to prevent typos.

Accepts numeric values only. Useful for quantities, amounts, or identification numbers.

A date picker that lets users select a calendar date.

Similar to the Date type but also includes a time component, allowing users to specify both a date and a time.

A yes/no toggle. You can configure the default value to pre-select one of the options.

A multi-line text input for longer content such as descriptions, notes, or paragraphs.


A select menu where users choose from a predefined list of options. Each option has a label (what the user sees) and a value (what gets stored).

Dropdown configuration includes:
Allows users to select one or more options from a set of checkboxes.

Info
Checkbox variables are only available for PDF templates. DOCX templates do not support the checkbox type.
A field specifically designed for monetary values, with formatting appropriate for currency amounts.

A signature variable that collects an electronic signature from the user. Signature variables support three subtypes:

For more details on configuring signature fields, see eSignatures in Templates.
A clause variable pulls content from the Clause Library, allowing users to select from pre-approved legal or contractual clauses. Clause variables can be used with the Edit Document Content workflow step to let reviewers choose or modify clauses during the approval process.

A freeform content field that allows formatted text input. Unlike the standard Text type, Custom Text supports richer content.

You can apply regular expression patterns to validate the format of text and number variables. This ensures that users enter values matching a specific pattern before the form can be submitted.
DocQ includes several common validation patterns out of the box:
You can define your own regular expression pattern. For example, to validate a credit card number format, you could use a pattern that enforces the expected digit grouping.
Warning
Regular expression validation runs on the client side. Make sure your patterns are tested thoroughly, as an incorrect pattern may prevent users from submitting valid values.
After configuring your variables, click the Save button to apply the changes. If there are any issues -- such as duplicate names or missing required fields -- the editor displays errors highlighted in red. Resolve all errors before saving.