Set Question Defaults with Query Parameters

Learn how to set defaults externally, by using query parameters

If your calculator is part of an existing flow of data inputs, there might be times when you want to set the default value of a question based on the data you already gathered from this user. A commonly used example is the email address field, which is sometimes known ahead of time.

ConvertCalculator supports setting these default question values by using query parameters. Here's how it works:

  1. Go to the question settings you want pre-filled
  2. In a question's logic settings, toggle on the switch "Set default value from query parameter"
  3. Fill out the name of the query parameter (e.g., email address)

Make sure you use the query parameter in your link. E.g., https://www.bananastand.com/banana-calculator?emailaddress=michaelbluth@bluthcompany.com

Now when a user clicks on this link, the calculator shows up with the email question pre-filled with "michaelbluth@bluthcompany.com"

Using the values of a calculator in another calculator

You can use values from one calculator, inputs, and formulas, in other calculators. Please see this example below (which is also available as a template).

The example includes the values of the formula and the email field from another calculator form. The query parameter becomes a bit more complex, but this link includes the following:
HTML
https://app.convertcalculator.co/to/wHM9cHcf5acAcj8Qu?area={{#formula}}VA{{/formula}}&email={{#formula}}QB{label}{{/formula}} We can break the link down into 3 parts: 1. web-address: https://app.convertcalculator.co/to/wHM9cHcf5acAcj8Qu 2. query parameter for area: `?area={{#formula}}VA{{/formula}}` 3. query parameter for email: `&email={{#formula}}QB{label}{{/formula}}` Because we are using values from the calculator, we have to include `{{#formula}} {{/formula}}`.

Supported questions

Most question types support setting defaults with query parameters. Here's a list of common patterns for settings the values:

  1. Number (?price=80 - just a plain number)
  2. Radio (?option=30 - use the value from the option and make sure there is only one option with this value)
  3. Yes / No (?wants-newsletter=1 - use 1 for Yes and 0 for No)
  4. Text Field (?name=Michael+Bluth - just text)
  5. Email (?emailaddress=michael@bluthcompany.com)
  6. Date (?start-date=2021-08-01 - Use yyyy-mm-dd format)
  7. Dates(?timeframe=1999-09-01|2021-09-01 Use yyyy-mm-dd format and divide two dates with | separator)
  8. Time (?start-time=22:23 Use 24 hour format with HH:mm))

Related articles

Learn more about set defaults in one of the following articles