Hi @SanfordWhiteman,
Thank is amazing and described so much better than I did on our internal meetings. Thank you for writing about this.
Great! One of the reasons I put stuff on the blog is so I myself can link to it instead of having to explain to people on the spot. 🙂
This seems overengineered.
If you want the form to NULL out your hidden fields when the corresponding query params are not present, then set the default form field value to NULL.
^ This
Hi Sanford,
The default form field value is NULL. It's a new field that we're yet to create, so no information will be recorded in it until anyone submits a form.
Apologies if I have not explained correctly the logic I have in my mind:
Set to NULL:
Keep info in utm fields:
Does that make sense?
The hidden querystring field after each form fill, so it's ready for the following form submission (if any, ever). The default will indeed be empty. I don't need this information staying there for more that it would take for the flows to work and assign the people to the right SFDC campaign
You’re just setting yourself up for race conditions and difficult-to-follow logic.
There’s no ill consequence from having a field keep its value until overwritten by another round of user input. The key is that you want all your UTM fields to be updated as a group — you don’t want utm_medium to come from one form post while utm_term comes from another.
So call the fields something useful (Most Recent UTM Medium, etc.) and make sure that on any given form post they’re either sent as the real value (from the URL) or default to the literal value “NULL“ (which will empty the field if they weren’t in the URL).
There’s no ill consequence from having a field keep its value until overwritten by another round of user input.
The reason I want to reset/empty the field value of the "querystring" field after each submission is that if a new form submission comes through with no querystring (for example, someone types in our website url and goes on to fill out a form) then it the field will keep it's previous value.
Marketo will not automatically update it to NULL.
What do you think?
if a new form submission comes through with no querystring (for example, someone types in our website url and goes on to fill out a form) then it the field will keep it's previous value.
Marketo will not automatically update it to NULL.
What do you think?
I think (know) that this is not true, because if the default value of an auto-filled hidden field is the string “NULL”, Marketo will send the string “NULL” to the server if the query param is not present. And “NULL” is Marketo’s special keyword that erases the previous value.
Sanford,
What you just said is news to me.
I admit I have never actually thought I can setup the default value of a hidden field to be NULL. In fact I think this renders all complex setup of the querystring field useless. If we're sure that the UTM fields are updated with no leftovers from previous form submits, then this should solve the issue.
Off to testing now. I'll update to thank you once again when I'm done.