Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Mike Walsh

    (@mpwalsh8)

    Yes you can do this but you will need to define the field on the Google Form and then set it up as a hidden field on the WordPress side.

    Here is a link to a post on my web site which explains how this works.

    Thread Starter aaearhart

    (@aaearhart)

    Thanks, Mike.

    However, I’m struggling with how to get the parameters out of the URI and in to the hidden field values.

    Plugin Author Mike Walsh

    (@mpwalsh8)

    You don’t need to get the parameters out of the URI – you need to examine the HTML source for the Google Form so you can figure out the entry field ids. If you look at the source for a form, each INPUT field has an ID and NAME attribute associated with it. It is the value of the NAME field which you’ll want to use (it has the period in it – entry.12345678) to set it up on the WordPress side.

    Thread Starter aaearhart

    (@aaearhart)

    Actually, I do need the parameters from the URI. They will be unique to each form submission.

    I had already set up the hidden fields as described. (ss: https://imgur.com/J6L3x5m )

    Each time a form goes out, those two parameters will reflect details unique to that submission. I need those to be passed through the form. If I were to hard-code them in to the hidden fields, it would defeat the purpose of tracking the submission.

    Plugin Author Mike Walsh

    (@mpwalsh8)

    Based on the picture you showed, you shouldn’t have to do anything else. The values for those hidden fields will be determined by the plugin and injected into the form’s hidden fields.

    Now there is one very critical element to this working – it is done with a jQuery plugin so if you have any Javascript errors on your page, the jQuery plugin won’t run and the values won’t ever be set.

    If you have specific values (using the value dropdown for hidden fields) that you want to set, I have some information on a couple posts on my web site – see this post and this other post.

    The second post decribes how you can use multiple instances of the same form.

    Thread Starter aaearhart

    (@aaearhart)

    Do I have the Field types properly selected?

    Thread Starter aaearhart

    (@aaearhart)

    Here’s my workflow:
    1. Hidden fields set up on Google Form: https://imgur.com/ZyYwSj1
    2. Get field names using Pre-filled fields option: https://imgur.com/2L3kAt8
    3. Gives me a URL with names for hidden fields: https://imgur.com/0gc4u7A
    4. Which I use to create the link to the form: https://imgur.com/7nuztS9
    5. When I complete the WP Google form and click submit, the hidden field values do not pass through: https://imgur.com/wk082n8

    What am I doing incorrectly?

    Plugin Author Mike Walsh

    (@mpwalsh8)

    You don’t want to use the pre-filled URL for the the URL you define your form with in WordPress, I think that is the crux of your problem.

    Any value in the pre-filled URL, which in your case are blank values, will override anything which comes through via the POST parameters. You can use the pre-filled URL to get the field names that you then define within WordPress and associate the field type as we discussed yesterday.

    Thread Starter aaearhart

    (@aaearhart)

    I’m not sure what other way to say this.

    I absolutely can not define them within WordPress because they will change every time the form goes out.

    As I mentioned yesterday, I need to track each submission individually. It would be completely satisfactory if I could get just one of the hidden fields to post the URL or http_referer but I’m unable to get those types to work for me.

    Plugin Author Mike Walsh

    (@mpwalsh8)

    Can you enter your form details in my Help and Support form and I’ll see if I can make it work?

    Thread Starter aaearhart

    (@aaearhart)

    Submitted.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Hidden Fields and URI parameters’ is closed to new replies.