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:
- Go to the question settings you want prefilled
- In a question's logic settings, toggle on the switch "Set default value from query parameter"
- 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://firstname.lastname@example.org
Now when a user clicks on this link, the calculator shows up with the email question prefilled with "email@example.com"
Most question types support setting defaults with query parameters. Here's a list, with common patterns for settings the values:
- Number (
?price=80- just a plain number)
- Radio (
?option=30- use the value from the option and make sure there is only one option with this value)
- Yes / No (
?wants-newsletter=1- use 1 for Yes and 0 for No)
- Text Field (
?name=Michael+Bluth- just text)
- Email (
- Date (
?start-date=2021-08-01- Use yyyy-mm-dd format)
?timeframe=1999-09-01|2021-09-01Use yyyy-mm-dd format and divide two dates with
- Time (
?start-time=22:23Use 24 hour format with HH:mm))