Video tutorial about prefilling questions.
Using logic4 Min.2 Min.

How to prefill question blocks with initial values

You can enter initial values to your question blocks, so you can help your respondents to fill out your form quickly.


When to use

Normally all forms start with all blank input fields. But in some cases you already know some answers of your respondents, so why not prefill them? By doing so your respondents can complete your form easier and faster, resulting in higher completion rates. Some examples:

  • Most of your respondents live in New York City, so in the 'City' question in your form, you prefill 'New York City'. Most of your respondents can now simply accept the answer and continue your form;
  • You have sent personalized invitation links to your respondents, so you already know the name of each respondent. The name is part of the form URL that you have sent them. You can now use that value from the URL to prefill in the 'Name' question;
Screenshot of a prefilled form in Tripetto
Demonstration of prefilling a question block from the URL (?name=Julie).

πŸ“Œ Also see: Set value block

In the article you're reading now we describe how to prefill values in your question blocks. We use the set value block for that. For global instructions about the set value block, please have a look at this article:

πŸ“Œ Also see: Update values

It's important to know that prefilling only works for blocks that don't have a value yet. If you want to update blocks that already have a value, please have a look at this article:


How to use

You can prefill question blocks with the set value block.

Add set value block

First build your form with the question blocks you want to prefill.

Continue with adding a set value block. In this case we add that block at the start of our form, so all our blocks will become prefilled when the respondent opens the form.

Select purpose

Now open the set value block. You will first see the Purpose feature. Set that to Prefilling and the builder will make sure all settings are configured correctly for you.

πŸ“Œ Also see: Update values

It's important to know that prefilling only works for blocks that don't have a value yet. If you want to update blocks that already have a value, please have a look at this article:

Screenshot of the form builder in Tripetto
A form setup with an empty set value block with purpose Prefilling.

Add values

Now you can make a list of question blocks that you want to prefill with a certain value. Per row in your list you can determine how you want to prefill that, for example:

  • Prefill with a static value;
  • Prefill with a value from the query string.

Example: prefill with static value

In this example we want to prefill our 'City' question with the fixed value 'New York City', as we know most of our respondents live there. Follow these steps:

  1. In the set value block click the button at the bottom of the Values list;
  2. Next select the City question from the form. In our example form this is a dropdown question type;
  3. Now select Fixed value as the desired value;
  4. Now select the right value from the dropdown options, in this case we select New York City.

That's it! Now the form will always select 'New York City' as the default selected option.

Screenshot of the form builder in Tripetto
The steps to take to prefill with a static value.

Example: prefill with query string value

In this example we want to prefill our 'Name' question with a value that we collect from the query string of the form URL (what's a query string?). Our form URL for example looks something like this: https://tripetto.app/your-form/?name=Julie. Follow these steps:

  1. We can use the same set value block to prefill multiple question blocks. Just click the button at the bottom of the Values list again;
  2. Next select the Name question from the form. In our example form this is a text (single line) question type;
  3. Now select From query string as the desired value;
  4. Now enter the query string parameter that you want to use the value of. In this case we want to use the value of parameter name.

That's it! Now the form will use the value that's entered in the URL as the default entered text value.

Screenshot of the form builder in Tripetto
The steps to take to prefill with a value from the query string.

More information

The set value block has lots of possibilities, so we have several help articles to learn all about it:

In this article

    Help us improve