Polls, surveys & forms

Prefill answers from the link

Answer questions in advance through URL parameters, and save additional values with hidden fields.

Last updated

Every poll can be answered in advance through its link. Use it to fill in what you already know, for example a voting code, a name from your email tool or a choice someone made in another form. Respondents still see the prefilled answers and can change them before they submit.

Prefill a unique code

If your poll uses unique codes, add the code to the link with code, for example https://strawpoll.com/r/abc123?code=K7MP2QXR. Voters skip the code screen and go directly to the questions, and the vote counts against that code. Codes are not case-sensitive.

Send each voter their own link, for example through a mail merge in your email tool. On the Unique codes tab, Copy link with this code copies the link for a single code. A code that is invalid or already used shows the code screen with an error, so the voter can enter a different one.

Each question has its own parameter, generated from its title when you first publish: “Favorite food?” becomes favorite_food. It stays the same when you change the title later, so links you have already sent continue to work. To find it:

  1. Open the poll in the editor and select the question.
  2. In the question’s settings, the parameter is under Prefill label.

Add it to the poll link with the answer you want, for example https://strawpoll.com/r/abc123?favorite_food=Pizza. To prefill several questions, join their parameters with &.

You can rename a parameter in Prefill label, using letters, numbers and underscores. Each one is used once per poll, so a name that is already taken receives a number, for example name_2. Links that use the question’s ID still work.

Values must be URL-encoded, so a space becomes %20 and a comma inside a label becomes %2C. Most email and marketing tools do this for you.

What can be prefilled

Question typeValue
Unique codeThe voter’s code, as ?code=K7MP2QXR. The parameter is always code. See Prefill a unique code.
Contact infoName, email and other custom fields. Each field, including ones you add, has its own parameter named after its label, listed in the question’s settings.
Multiple choice, Picture choiceThe option’s label (not case-sensitive). Separate several with commas.
Short text, Long textThe text.
Word cloudThe word or phrase.
NumberThe number, like 42.
DateThe day as YYYY-MM-DD, like 2026-12-24.
Yes / Noyes or no, or the label you gave the answer.
Rating, Opinion scaleOne of the question’s numbers, like 4.

Other question types, such as rankings, matrices and meetings, cannot be prefilled.

The following rules apply:

  • Options that do not exist are ignored. If a question allows only one answer, only the first matching option is selected.
  • An option whose label contains a comma still matches when you pass the whole label.
  • Empty parameters are ignored, and the respondent sees the question as usual.

Hidden fields

To save a value with each response without asking for it, such as where people came from, add a Hidden fields block from Content & layout in the editor and list the URL parameters to keep, for example utm_source, customer_id.

Respondents do not see hidden fields. Their values appear as columns in the responses table and in your CSV export.

Related articles