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 where you want to set a default value of a question based on the data you already gathered from this user. A commonly used example is the email addres 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 prefilled
  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. emailaddress)

Now, n the link, make sure you use the query parameter. 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 prefilled with "michaelbluth@bluthcompany.com"

Supported questions

Most question types support setting defaults with query parameters. Here's a list, with 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))