Dynamic Forms: Pre-fill values

Fields in a Podio webform are empty by default when the page is visited. In this section you'll learn how you can pre-fill fields in your webform by adapting the URL of your webform. 

Note: prefilling webforms is also possible for embedded webforms. Go to step 7 to learn more about this. 

1. Go to the developer page of the app

Go to the app which webform you’d like to prefill. Open the app menu and select the option “Developer”.

Momentum

 

2. Find the external ID's of the fields you want to prefill

On the developer page, you will see a list of all fields in the app. For any field you want to prefill, note its corresponding value in the “External ID” column.

Momentum

 

3. Get the URL of your webform

To get the form URL go to the webforms overview page and click on Share in the menu bar. The form URL will be shown in the Share box.

Momentum

 

4. Creating a URL that prefills a text field

To make the prefilling work, we follow a standard way of adding parameters to a URL. The format looks like this: 

  • Format: Webform URL & External ID = Value
  • Example: https://forms.momentumtools.io/?form=ztyqflozrrwt&company-name=momentum
Momentum

5. Prefill more than one field

To prefill more than one field, you can add additional parameters by separating the field and value pairs with an ampersand (&), like this:

  • Format: Webform URL & External ID 1 = Value 1 & External ID 2 = Value 2 
  • Example: https://forms.momentumtools.io/?form=ztyqflozrrwt&company-name=momentum&contact-name=willem
Momentum

6. Pre-filling different field types

Podio has a many different types of fields. The text field we’ve used so far is simple as it’s a single value, but other fields like category or relationship are more complex. To complete this tutorial, here is a complete overview of the supported field types and what format you need to use to prefill them.

  • Text Field: Webform URL & External ID = Value
  • Number Field: Webform URL & External ID = Value

Category fields

For category fields you need to use a different syntax to pre-fill the values. In this case you need to specify which label id (1, 2, ...) you would like to check. Click here to find out how to get the label IDs.

Use the following syntax:

  • Category Single: Webform URL & External ID = Label ID
  • Category Multiple: Webform URL & External ID[Label ID] = true 

Examples

  • Category Single: https://forms.momentumtools.io/?form=ztyqflozrrwt&lead-status=3
  • Category Multiple: https://forms.momentumtools.io/?form=ztyqflozrrwt&area[2]=true

Relationships fields

For relationship fields you need to use a different syntax to pre-fill the values. In this case you need to specify which label id (1, 2, ...) you would like to check. Use the following syntax:

  • Relationship one value: Webform URL & External ID = Item ID_Item label
  • Relationship Multiple valuesWebform URL & External ID = Item ID 1_Item label 1||Item ID 2_Item label 2

Examples

7. Embedded forms

To pre-fill values for embedded forms, you can add a value to the attribute data-prefill in the embedded code.

<div id="momentumtools-form" data-prefill='{"external_id": "value"}'></div>