Articles on: Forms

Forms – Field Types and Actions

In this guide, we’ll walk you through the different types of fields you can use in your forms, along with the actions you can take once the data is collected. Whether you're gathering simple information or integrating with third-party services, understanding these field types and actions will help you create more effective and efficient forms tailored to your needs.


Not sure how to create a form? Start with this guide – How to Create a Form.


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


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


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


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


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.


Form Fields

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.


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.


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 and Container component.


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. This means you'll need to re-upload the JSON data each time you open the template for editing.


Table Field Configuration in Form


Table Component Setup in Template


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.


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 response, with the addition of a form_data property containing all submitted form values.


Response Example with Generated Document


{
"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


{
"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"
}


Updated on: 07/08/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!