The Form-Builder API

Query Params

Your form can access browser query parameters using the form.param() function. As an example, let's assume a user has navigated to a form at the URL:

Your form can then use the param() function to extract these values from the query string:

let utmSource = form.param('utm_source');
let utmCampaign = form.param('utm_campaign');
let utmMedium = form.param('utm_medium');

await form.statement("UTM data from the query string", {
  description: `
  - Source: ${utmSource}
  - Campaign: ${utmCampaign}
  - Medium: ${utmMedium}

Which generates this form:

A typical use case would be to record UTM parameters for a submission via hidden fields.