Forms has hidden inputs in the components to collect UTM values from the URL.

enter image description here

Once the form was filled in, the submission appeares correctly in the results table, both the public fields like the name, surname, etc ... as the content of the utm.

Recently, the new forms created do not store utm values, not even the cloned forms of a functional form.

enter image description here

Identical forms, in some takes the UTMs (forms with some time), in others not (created / cloned recently). Even shown in the same view.

I have tried to see with the devel module if there was a failure when interpreting the forms or the hidden fields ... without result.

Any idea or direction where the problem could go?

Thanks for your time.

  • Are you using the technique covered in drupal.stackexchange.com/questions/81182/… to fill the fields? May 8, 2018 at 13:18
  • @AlfredArmstrong Thanks for your reply, unlike the post you mentioned, the UTM format is: &utm_unidad=foo&utm_canal=foo&utm_origen=foo. Up to now they are automatically filled in, as long as the hidden fields of the form coincide with the fields in the UTM.
    – Qu4k3
    May 10, 2018 at 8:00
  • that's curious. I would not expect the fields to be filled in automatically by default. You might want to try explicitly setting a default using eg. "[current_page:query:utm_unidad]". May 10, 2018 at 9:17
  • @AlfredArmstrong It worked fine! Do you want to write an answer so I can give you rep ? Thanks again for your time.
    – Qu4k3
    May 10, 2018 at 9:38
  • Answer added @Qu4k3 May 10, 2018 at 9:44

1 Answer 1


The answer here provides the method you can use to pass URL query variables into hidden fields in webform.

What you need to do is assign a default value to each field which uses a token representing the query variable. So, for example, the field for "utm_unidad" should have a default value of:


And so on for the other fields.

  • Did this stop working for UTM parameters? If I put in [current-page:query:your_name], it works. But if I put in [current-page:query:utm_source], the result is value="[current-page:query:utm_source]" Feb 1 at 18:37
  • @DelfordChaffin is there actually a value for that parameter? If sometimes it may be missing you need to add the suffix ":clear" to the token, eg [current-page:query:utm_source:clear], drupal.org/node/2972423 Feb 2 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.