> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.pdfgeneratorapi.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Forms – Field Types and Actions

PDF Generator API forms support ten field types: Text, Integer, Number, Date, Signature, Select, Multi-Select, Table, Image (PNG and JPG) and PDF upload. After submission a form can run four actions: store the generated document in Document Storage for 30 days, let the user download it, send it straight to review and signature, or send the data and the document to a third party service through a callback URL with up to 10 custom headers. Each field has a Field Name, and the same name in curly brackets, for example {country_of_birth}, places the value in your template. This guide explains every field type and action in detail.
| Not sure how to create a form? Start with this guide - [How to Create a Form](/en/article/how-to-create-a-form-152rrmx/).
---

### Standard Fields

###### Name

The Name field is used to specify the form's title, which will be displayed in the PDF Generator API customer portal. This is how the form will be identified and stored.

![Form Name](https://storage.crisp.chat/users/helpdesk/website/-/1/1/e/0/11e0e518fc48ce00/formsname_13934gm.png)

###### Template

In the Template section, you can choose a template that will be used to generate the final document when the form is submitted. If you only need to collect data and not generate a document, select **No template** in the Templates section:

![Form for Data Collection Only](https://storage.crisp.chat/users/helpdesk/website/-/1/1/e/0/11e0e518fc48ce00/formsnotemplate2_1rycdgn.png)

###### Title

The Title field is the heading that will appear at the top of the form when it is opened by the user. This should be a brief description of what the form is for.

###### Introduction

The Introduction field allows you to provide additional context or instructions at the beginning of the form. It can be used to explain the form's purpose, guide users on how to fill it out, or provide any necessary information.

![Form Title & Introduction](https://storage.crisp.chat/users/helpdesk/website/-/1/1/e/0/11e0e518fc48ce00/formtitleandintro_4b9rkm.png)

###### Outro

The Outro field is displayed at the end of the form. You can use this field to thank users for submitting the form, provide confirmation, or offer next steps or instructions on what to do after the form is submitted.

![Form Outro](https://storage.crisp.chat/users/helpdesk/website/-/1/1/e/0/11e0e518fc48ce00/outro_1wulnws.png)
---

### Form Fields

Form fields allow you to define the structure and behavior of each input element in your form. With customizable labels, default values, and validation options, you can tailor each field to collect exactly the data you need.

These are the options you can configure for each form field:

* **Label** – Text displayed inside or above the input field in the Form (e.g., "Country of Birth:").
* **Type** – Defines the type of data allowed (e.g., Text, Number, Date).
* **Field Name** – Unique identifier used to map submitted data to the template or identify it in collected form responses. If you want to generate a document from submitted data, use the same field name wrapped in curly brackets in your template (e.g., `{country_of_birth}`) to display the value in the document.
* **Default Value** – The initial value displayed in the form field by default, which remains unless the user changes it.
* **Required** – When checked, the field must be filled in before the form can be submitted.
* **Description** – Optional text displayed with the field to provide additional instructions or context, helping users fill out the form correctly.

![Form Fields](https://storage.crisp.chat/users/helpdesk/website/-/1/1/e/0/11e0e518fc48ce00/formfields_1v0uf3d.png)
### Field Types

Our Forms support a variety of field types to capture different kinds of data, making forms flexible and suitable for a wide range of use cases:

###### Text

For capturing free-form input such as names, addresses, or descriptions.

###### Integer

For whole numbers only, such as age, quantity, or item count.

###### Number

For any numeric input, including decimals, like prices, weights, or percentages.

###### Date

For selecting specific dates, such as submission dates, birth dates, or expiration dates.

###### Signature

Allows users to sign documents digitally for approvals or confirmations.

###### Select (Drop-down)

For choosing a single option from a predefined list, such as service types or product categories. To define the available choices, enter the options as a comma-separated list. For example:

`Option A, Option B, Option C`

**Use case: Using Select Field Values to Control Radio Buttons in Generated Documents**

If you want to display a radio button selection in a generated document, for example with two options **"Yes"** and **"No"** defined in the form, you can control which radio button is checked by using an expression in your template. For instance, if the field name is `status_field`, you can use this expression to mark the "Yes" radio button as selected:

`{% {status_field} === "Yes" ? 1 : 0 %}`

Similarly, the "No" radio button can be handled accordingly in your template.

| To learn more about the Radio button component, please see our article [here](/en/article/checkbox-radio-button-component-1idy3y4/).

###### Multi-Select

For selecting multiple options from a list, useful for preferences like areas of interest or communication methods. To define the available choices, enter the options as a comma-separated list. For example:

`Option A, Option B, Option C`

If you're using the collected data to generate a document, keep in mind that the selected values will be stored as a list of data. In order to display them properly in the document, you'll need to define an expression in the template that loops through and renders each selected option.

For example, if the field name is `occupation_status` and you want to display each selected option on a new line with a bullet point in your generated document, use the following expression inside a text component within your template:

`{% join("\n", iterate({occupation_status}, "'• '~value")) %}`

| To find out more about our available functions, check out this [article](/en/article/functions-srekaa/).

###### Table

Enables entry of structured, row-based information like invoice items, attendee lists, or technical specifications. Ideal for documents that require detailed breakdowns.

The Table field collects structured data as an array of objects, where each object represents one set of related values (for example, a single item or entry). The field name you assign to the table is the array name in the submitted data, under which you then define the individual values you want to collect such as first name, last name, or date. These values are configured the same way as other form fields.

**Using Table Field Data in Document Generation**

If you want to generate a document after a form is submitted and you're collecting data using a **Table field**, you'll need to configure a **Table** or **Container** component in the template to iterate over that data — just like when generating documents via the API. To learn more about how to configure these components, check out our articles on the [Table component](/en/article/table-component-1fuaafc/) and [Container component](/en/article/container-component-5fi9zb/).

To properly configure Table or Container components in your template, you need a JSON dataset to assign the array. While you can use your own dataset if you have one, we assume that most form users won't have one available during template setup. To make this process easier, you can use the example JSON below:

```
{
  "occupation": [
    {
      "position": "Software Engineer",
      "employer": "TechCorp",
      "address": "123 Tech Street"
    },
    {
      "position": "Product Manager",
      "employer": "BizSolutions",
      "address": "456 Business Ave"
    }
  ]
}
```

You can paste this example dataset directly into the template before opening it—simply click on the template and select **Paste from clipboard** to insert the JSON. Alternatively, if you already have the template open, go to **Insert → Data → Paste from clipboard** to add the sample data. Just make sure the array name and object keys match the Table field settings in your form.

|| JSON data uploaded to the template is not saved due to our [data privacy policy](https://pdfgeneratorapi.com/data-security-privacy). This means you'll need to re-upload the JSON data each time you open the template for editing.

![Table Field Configuration in Form](https://storage.crisp.chat/users/helpdesk/website/-/1/1/e/0/11e0e518fc48ce00/formstable_lex46y.png)

![Table Component Setup in Template](https://storage.crisp.chat/users/helpdesk/website/-/1/1/e/0/11e0e518fc48ce00/tableforms_1cpmbgr.png)

###### Image

Allows users to securely upload images, such as photos for ID verification or visual evidence.

|| At the moment, only .png and .jpg image formats are fully supported.

###### PDF

Allows users to securely upload PDF documents, like contracts, forms, or supporting files. The uploaded PDF file is stored as a base64 encoded string and, although not visible in the generated document, it is included when data is sent to third-party applications.
---

### Form Actions

Forms actions are the steps that occur after a form is submitted. These actions allow you to define what happens with the collected data.

###### Store the Document

This action saves the generated document to **Document Storage**.

||| Documents saved using this action will be available for 30 days and then automatically deleted.

###### Download the Document

This option allows users to download the generated document after the form is successfully submitted.

###### Sign the Document

This option redirects users to the Document Review and Signing flow immediately after the form is submitted. The generated document is pre-populated with the submitted data, ready for review and signature without any additional manual steps. Once signed, the completed document is automatically saved to Document Storage, where you can review its history and download the final signed version.

||| Documents saved to Document Storage will be available for 30 days and then automatically deleted.

###### Send Data and Document to Third Party Service

This action allows you to send the collected form data and the generated document to a third-party service via HTTP request, enabling seamless integration with external systems.

To set it up, define the Callback URL where the data should be sent, and optionally add up to 10 custom headers to match the receiving service’s requirements. The request payload follows the similar structure as the [Async Document Generation](https://docs.pdfgeneratorapi.com/v4/#tag/Documents/operation/generateDocumentAsynchronous) response, with the addition of a `form_data` property containing all submitted form values.

**Response Example with Generated Document**

```json
{
  "response": "https://us1.pdfgeneratorapi.com/api/v4/documents/11813/e467febad788351dd863b3176ebf4243/share",
  "meta": {
    "name": "Form Name Test.pdf",
    "display_name": "Form Name Test",
    "encoding": "binary",
    "content-type": "application/pdf",
  },
  "form_data": {
        "name": "John Smith",
        "company": "ACME Inc",
        "address": "70 Washington Square South, New York, NY 10012, United States"
  },
  "form_public_id": "d830f695-538b-42f9-a753-8b662233cdb6"
}
```

**Response Example for Data Collection Only**

```json
{
  "form_data": {
     "name": "John Smith",
     "company": "ACME Inc",
     "address": "70 Washington Square South, New York, NY 10012, United States"
  },
  "form_public_id": "d830f695-538b-42f9-a753-8b662233cdb6"
}
```
---
### Related articles you may find helpful

* [Common use-cases of the Expression language](/en/article/common-use-cases-of-the-expression-language-1seclga/)
* [How to Integrate with Make](/en/article/how-to-integrate-with-make-18x0r2x/)
* [Text Component](/en/article/text-component-c3s12i/)