We noticed that JavaScript is disabled in your browser. We suggest enabling it for a better experience.
We noticed you're using an older version of Internet Explorer. We suggest you update to the latest version for a better experience.
Skip to main content

Fill a form using external IDs

Pro, Business and Enterprise plans

There are two ways pre-fill a form: using information from a host page, and using a query string

Fill using information from a host page

If you’ve embedded a form in a page of your site, you can use information from the page to pre-fill many of the form’s fields. 

The following fields can be pre-filled:

  • Text
  • Radio Button
  • Heading
  • Number
  • Date
  • List
  • Drop-down
  • Email
  • Image
  • Checkbox
  • Rank
  • Video

To do this, you have to edit your site's HTML and link it to your form.

Add HTML tags to your page

To pre-fill an embedded form, you first have to add some HTML tags to your webpage.

These HTML tags will hold information in your site template so it can be used on any form you embed in your site. They’re most useful for holding user details like name, address, suburb, or company.

The format for the HTML tags present in your webpage must have type=“hidden”, a class=“of-params” and a name and value. The value can be filled by a user detail or data field template. This HTML needs to be put within the <body> tag, not in the <head>.

Example tag formats

  • <input type="hidden" class="of-params" name="date" value="02/07/1989" />
  • <input type="hidden" class="of-params" name="Number" value="2" />
  • <input type="hidden" class="of-params" name="Checkbox" value="Yes,No" />

  • <input type="hidden" class="of-params" name="radio" value="Option 1" />

  • <input type="hidden" class="of-params" name="textbox" value="John" />

Link your tags to your form

Once you’ve added your HTML tags to your site, you need to link them to your form.

  1. Go to OpenForms and open your form from Forms.

  2. Go to the Build tab.

  3. Find a field you want to fill using your webpage. Select the gear icon to open its settings.

    2019-07-30_13-49-08.png
  4. Open the Advanced tab.

  5. In the External ID field, enter the name of an HTML tag from your site and press Set.

  6. Save your form.

If you’d prefer to set up a traditional data connection with your form, visit Connect to services to validate or retrieve data for your form.

Fill using a query string

You don't have to embed a form in a host page to pre-fill its fields—you can use a query string. A query string is essentially an extra piece of text that you add to a URL. In this case, you'll be changing the URL for the form.

  1. Add an External ID (e.g. "textfield") to the field you want to pre-fill. External IDs can contain spaces (for example, "home address" as a location field).
  2.  See published form to open your form and find its URL.
    see live.png
  3. In the address bar, Add a query string to the end of the URL.
    Use this format: ?yourexternalID=answertoprefill
    e.g. ?textfield=yes

    textfield.gif
    To fill more than one field, add a query string to the end of the URL in this format:
    ?externalID1=answertoprefill&externalID2=answertoprefill
    e.g. ?textfield=yes&dropdown=12

When you link to the form using this version of the URL, the field will be automatically filled.

Was this helpful?