0

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? – Alfred Armstrong May 8 '18 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 '18 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]". – Alfred Armstrong May 10 '18 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 '18 at 9:38
  • Answer added @Qu4k3 – Alfred Armstrong May 10 '18 at 9:44
0

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:

[current_page:query:utm_unidad]

And so on for the other fields.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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