Google-forms – How to record the value of GET parameters passed to a Google form in hidden inputs

google-forms

My question is basically the same as this one asked on StackOverflow, too old to migrate, but which seems to be a better fit here.

This answer (more authoritatively, here) suggests a way to add a visible field to a form and set its default value, but I'd like to then make that field hidden to help not confuse people who are filling out the form.

This question suggests a couple failed strategies to get hidden items, such as prefilling a deleted question or skipped page. I have a single-page form and for UX reasons need to keep it that way.

This snippet suggests it's possible but doesn't say how.

Best Answer

What @Ruben mentions is correct.

Still. I believe that you can achieve what you want because you do NOT actually want to hide the field.
Frankly, I do NOT see a need to hide the fields from your users.

You mention:

...but I'd like to then make that field hidden to help not confuse people who are filling out the form

Assuming I read your question correctly, the following could be the solution to your problem.


How to prevent users from altering a prefilled question/field
or How to "hide" a prefilled question

  • Create a question.
    1. Make the answer multiple choice with just one option.
    2. Make the answer required.
  • Repeat steps 1 & 2 for as many questions as you like.
  • Prefill the fields.
  • Share the prefilled link of the form.

A very simple solution.