Providing different PDF documents based on user input

Last updated:

Learn how to use conditions in Formcentric to automatically deliver different PDF documents based on the options your users select in a form.

Imagine running a contact form where users identify as either a private customer or a business customer. Depending on their choice, you need to capture different details—for instance, business customers supply their company name and tax ID, whereas private customers do not. Once the form is submitted, you want to offer each group a customized PDF summary containing only their relevant information.

To learn more about the different ways to generate PDFs from form submissions, take a look at our article on providing form submissions as a PDF. This guide uses the Use PDF design action to demonstrate the setup.

Step 1: Activate a PDF design in the Admin centre

Make sure your preferred PDF design is marked as active in the Admin centre. To learn how to create and activate layouts, see our article on using a PDF design.

Step 2: Set up multiple PDF actions in your form

To generate a tailored PDF document for each option, set up a dedicated PDF action for every scenario inside your form:

  1. Open your form, click Settings in the top menu, and select Actions from the left sidebar.
  2. Scroll down to the PDF section and click New PDF.
  3. Set up the first PDF action (e.g., for private customers):
    1. Enter a clear, distinct internal name under Label (e.g., "Private Customer PDF") so you can identify it easily later.
    2. Under Form elements, select only the fields relevant to private customers.
  4. Repeat the process to create the second action (e.g., "Business Customer PDF"). Select the same PDF design, but this time include the extra fields for company name and tax ID.

Step 3: Create a confirmation message for each option

Next, create a tailored confirmation message for each option, including the relevant PDF download link. For step-by-step instructions on setting these up, see our article on setting up confirmation messages.

Confirmation message for private customers

Place your cursor inside the text editor where you want the link to appear, click the PDF icon above the toolbar, and select the download link for your "Private Customer PDF" action.

Confirmation message for business customers

Create a second confirmation message and insert the download link for your "Business Customer PDF" action.

Step 4: Set up your conditions

Finally, set up logic conditions to display the correct confirmation message based on what the user selects in the form:

  1. Toggle the Condition switch to the right underneath your private customer confirmation message.
  2. Define your logic in the If section:
    1. Select the choice element containing your user classification question (e.g., "I am contacting you as a:").
    2. Set the operator to selected and choose Private customer as the value.
  3. In the Then section, select Show confirmation message.
  4. Repeat steps 1–3 for your business customer confirmation message, selecting Business customer as the value instead.

Feedback