How do you edit URL Parameters in a Hidden Field to always reflect same "query parameters" for that form submission?

Highlighted
Level 4

How do you edit URL Parameters in a Hidden Field to always reflect same "query parameters" for that form submission?

I have seen this (Set a Hidden Form Field Value) Marketo Doc but I'm still unclear as to precisely the correct approach.

I need to get this ?Program=Email&ForImport=True‍ "Query Parameters" to be reflected on the lead record's activity history each time that form is submitted regardless if they came through an email/ad UTM link query OR if they went straight to the LP and the URL parameter is not attached.

How do I edit the "URL Parameter Value" in a hidden field so every time that form is submitted it will write the "Query Parameters" of ?Program=Email&ForImport=True on that lead record?

This is the landing page through a UTM link which obviously properly get the value from the URL parameter:

https://get.landingpage.com/?Program=Email&ForImport=True

How do I get that same result from a form submission from the same LP that does not have a query like this?

www.get.landingpage.com/

This was inherited and the mystery that surrounds this is that in our custom CRM which is a one-way street pushing data to Marketo. Marketo does not push data to our CRM, however, this URL Parameter (?Program=Email&ForImport=True) somehow (literally nobody knows as many developers have left) provides data that gets extracted mysteriously (without webhooks) from Marketo by our CRM which then triggers an alert to the specified Sales Rep.

12 REPLIES 12
Highlighted
Level 10 - Community Moderator

Re: How do you edit URL Parameters in a Hidden Field to always reflect same "query parameters" for that form submission?

Fundamentally, this cannot be related to the Hidden field "Autofill from query param" feature.

Because

  1. the query string ?Program=Email&ForImport=True contains 2 query parameters, and the Autofill feature will never support concatenating 2 parameters
  2. the Autofill feature does not send the query param name, it transfers the query param value to Marketo
  3. you want to use the same static value for all form posts, so it makes no sense to care about what's in the current query string

If you want that value -- which happens to look like a full query string -- posted to a single Hidden field, just set it as the default:

pastedImage_7.png

Highlighted

Re: How do you edit URL Parameters in a Hidden Field to always reflect same "query parameters" for that form submission?

Completely agree with Sanford! If value is going to be the same for every registered lead then you don't need to add these parameters in the query-string rather use default value for hidden field or if you want to use query-string parameter then you can follow below process:

If I were you, then I would do:
1. Will add two hidden field in the Marketo form "Program & For Import" separately

2. and then will assign the default to to this hidden field like below:

Program Field:

pastedImage_1.png


For Import (use boolean type field):

pastedImage_9.png

Adding default value will help you to capture the information even when you are not using query string URLs and when you are using the parameter then it will pick the value from URL itself.

Highlighted
Level 10 - Community Moderator

Re: How do you edit URL Parameters in a Hidden Field to always reflect same "query parameters" for that form submission?

Sure, but you'd also need a flow step to concatenate them, because the objective is a single field. Seems like a waste, you're using 3 fields instead of 1.

Although rereading the original question the concept (however ill-advised) may be to add these parameters to the actual URL before the form is rendered, so the URL that's present in the Filled Out Form activity will appear to have had that query string. This is possible using JavaScript, but would end up being highly misleading IMO.

Highlighted

Re: How do you edit URL Parameters in a Hidden Field to always reflect same "query parameters" for that form submission?

I understand your point of using three fields might be waste but it totally depends on our use-case. I mean, it totally depends on what we are trying to achieve with this capture.

And when we use the default value in the suggested format then it will capture the value in below format 

pastedImage_1.png

Highlighted
Level 10 - Community Moderator

Re: How do you edit URL Parameters in a Hidden Field to always reflect same "query parameters" for that form submission?

And when we use the default value in the suggested format then it will capture the value in below format 

That's the string value provided by the OP.

The question is whether this is supposed to be in the Activity Log, not a lead field. Though a mysterious, non-webhook, non-API solution that parses the Activity Log entry is impossible.

Highlighted

Re: How do you edit URL Parameters in a Hidden Field to always reflect same "query parameters" for that form submission?

Yeah sire and that's why I said, it's totally depend on the use-case. If this information is very useful for reporting/operation perspective then I would rather choose to capture in the best format.

Highlighted
Level 10 - Community Moderator

Re: How do you edit URL Parameters in a Hidden Field to always reflect same "query parameters" for that form submission?

In any case, it's quite likely that the problem domain has been misstated.

Highlighted
Level 4

Re: How do you edit URL Parameters in a Hidden Field to always reflect same "query parameters" for that form submission?

This is all very helpful. Thank you for assisting me in problem-solving. I can tell you a few things that may add insight and be helpful. The key missing element in my mind is... how and/or what information exactly is being scanned and extracted or pushed to the CRM that triggers these alerts?

I do know this pre-dated me here and the result does work and looks likes this in the Activity Log:

pastedImage_1.png

With the form set up like this:

pastedImage_2.png

'For Import' is a custom boolean field. I am just deducing by the fact that this alert email was triggered in the CRM previously by working through a Marketo form submission that the key to this functionality must lie in this 'For Import' "Query Parameter".

Now, I did edit the Autofill: For Import as advised.... and I had done this previously as well but that method did not create a "Query Parameter" in the Activity Log.

pastedImage_3.png

I also tried Get Value From: Use Default Value / Default Value: ?Program=Email&ForImport=True which did not write to the Activity Log.

This is so frustrating. Seems like such a simple thing. Through an email/Banner Ad UTM it works perfectly... without that it seems nothing works.

Highlighted

Re: How do you edit URL Parameters in a Hidden Field to always reflect same "query parameters" for that form submission?

Hi Ronn Burner, Have you approved the landing page after making amendments in the form? Parameter name seems fine to me in the screenshot. Have you checked form filled out activity for the lead you have submitted? Is this valued being captured in that field?

I can help you in the call if you want.