Articles on: Forms

How to Create a Form

Forms allow you to easily collect data from users and automatically generate documents without writing any code. You can create Forms from templates built within our editor or convert your existing PDF Forms into interactive Web Forms. This lets you efficiently gather information from customers, internal teams, or partners and automate document creation within your workflow.


In this tutorial, we’ll guide you through the process of creating a form using the PDF Generator API, covering three scenarios:



Create a New Form with a Custom Template (with PDF Generation)


1. Create a template in PDF Generator API editor


Before you can start collecting data and generating documents, you’ll first need to create a template. If you don’t have one yet, don’t worry—it’s easy to get started.


To create a template, simply head to the Templates page and click on New template.


Creating a New Template


When you click New template, a window will appear where you can upload your JSON data into the editor. However, if you're creating a form, uploading JSON data is not necessary, and you can simply click the Skip button to proceed without it.


Skip Button


After clicking the Skip button, you'll be redirected to the editor, where you can create a template that fits your needs. If you're unfamiliar with how to use the editor, we’ve prepared a tutorial to guide you through the process.


For this tutorial, we’ve prepared a basic Consent Form template layout. The form will require users to provide their name, date, and signature to confirm their consent.


Consent Form Template


In addition to designing the layout, you’ll also need to map the data fields — these define where the submitted form data will appear in the document. While it’s possible to map fields manually from the Templates page, it’s usually easier and more efficient to do this during the Web Form creation.


2. Create a form to collect data and generate the document


Now when your template layout is ready, it’s time to create a form to collect the data. This step involves adding the necessary fields (such as text fields, drop-downs, or date pickers) where users can input their information.


  1. To get started, navigate to the Forms page and click New form to create your first form.


Creating a New Form


  1. Begin by setting up the main settings: the form name, the template you created earlier (used to generate the document after submission), as well as the title, introduction, and outro message of the form.


Form Builder - Standard Fields


For a closer look at the standard fields you can add to your form, see more details here.


  1. In the next step, define what should happen after the user submits the form. This includes actions like saving the generated document, allowing the user to download it, or sending the collected data and the PDF to an external service using an HTTP request.


Form Actions Settings


You can find more details about available actions that can be triggered after form submission here.


  1. After setting up these actions, the next step is to create the individual form fields that will make up your form. For each field, you can customize the label that guides users, select the field type (such as text, number, date, image, etc.), and set a unique field name to match submitted data with your template. You can also add a default value that users can change and mark the field as required to ensure it’s filled before submission.


Form Fields


You can find more information about form fields, field types, and how to use them here.


For our form, we will create three form fields to collect the user’s name, date, and signature. We will assign each field an appropriate label, set the required field type, and give each a unique field name, which we will then map to our created template.


Consent Form Fields


  1. Once the required form fields are created, save the form and reopen it.


  1. The final step is to map the created form fields in the template. To do this, click the arrow next to the Save button and select Save & Edit Template.


Save & Edit Template Button


After clicking the Save & Edit Template button, the defined template opens in the editor, and in the left sidebar, you’ll see the created form fields. You can drag and drop these fields anywhere in the template or insert them directly into predefined components using the Insert Data Field button. By inserting these fields into the template, you ensure that the data entered by the user in the form will appear in the correct places after the form is submitted.


Make sure that the fields in the template are enclosed in curly brackets (e.g., {name}) so that the submitted data is properly linked to the template.


Mapping Form Fields in the Template


Once you're happy with the layout and field placement, don’t forget to save your template before closing the editor — otherwise, your changes might be lost.


  1. Now all that’s left is to share your form. You can do this by clicking the arrow next to the Save button in the form builder and selecting Save & Share, or by clicking the Share button on the Forms tab — just open the menu via the three dots on the right side of the form. This will copy the form URL to your clipboard, so you can easily share it with your users.



Create a Form Based on an Existing PDF Form (with PDF Generation)


If you already have an editable PDF form, there's no need to start from scratch! You can easily import your existing file and automatically generate a digital form based on its structure.


Editable PDF Form


  1. To automatically generate your pre-made editable PDF after a user submits the form, you first need to import the PDF as a template. Head over to the Templates page, click the arrow next to the New Template button, and select Import from PDF.


Importing PDF as a Template


Once the PDF is imported, it will be given a random name. To keep things organized, make sure to rename the template so it's easier to find and recognize later.


  1. After importing your PDF as a template, navigate to the Forms page, click the arrow next to the New Form button, and select Import editable PDF. This will automatically extract the editable fields from your PDF directly into the form builder, so you don’t have to create them manually!


Importing Editable PDF


  1. Once your editable PDF is imported, you’ll need to configure your form settings. Start by naming your form, selecting the imported PDF template for document generation, and adjusting other relevant settings, as well as actions after the form is submitted.


The extracted fields from your PDF will appear in the form builder with automatically generated names. To ensure a clear and user-friendly form, we recommend reviewing and fine-tuning each form field, including labels, placeholders, and required options, before sharing the form.


Form Builder with Extracted Fields


  1. When the form is configured and the extracted fields have been reviewed, the final step before sharing your form is to map each form field to its corresponding field name in the PDF template. Follow the same process as described from step 5 onwards in the "Create a form to collect data and generate the document" section.


Create a Form to Collect Data without Generating a PDF


Not every form needs to generate a PDF. You can also create a form used only for collecting data, which can then be sent directly to third-party services for further action or integration.


If you want to create a form only for data collection, select the No template option in the Template section of the form:


Setting Up a Form for Data Collection Only


Once you select the No template option, check the box for Send data and document to third-party service, and define the Callback URL where the data should be sent. You can also add custom headers by specifying the Header Name and its corresponding Header Value. These headers will be included when PDF Generator API makes a POST request to the callback URL.


You can define up to 10 headers for the callback.


Configuring Callback URL to Send Data


Response Example for Data Collection Only


{
"form_data": {
"name": "John Smith",
"date": "2025-08-07",
},
"form_public_id": "d830f695-538b-42f9-a753-8b662233cdb6"
}


Updated on: 11/08/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!