We have a scenario where customers will phone or email our Contact Centre directly and ask to be unsubscribed. Our CC staff do not have access to Marketo and we do not have a CRM to manage this. They have asked that:
My question is, without access to Marketo, is there a way for our CC staff to generate a URL of the unsubscribe landing page, that allows email address prefil? Something that would simply require them to just update the email address in the URL each time?
TIA
Solved! Go to Solution.
Sure. An easy approach is by having a regular Rich Text widget in addition to the hidden text field. Copy the value into the widget so you can style it however you want.
Just takes a little line of JS:
MktoForms2.whenReady(function(form){
form.getFormElem()[0].querySelector('#showEmail').innerHTML = form.getValues().Email;
})
Demo here: http://pages.vaneck.com/simple-unsubscribe.html?Email=chantell@tapsell.com
Sure, it's very easy. In Form Editor, set the Email field to pull its value from the URL param "email." To set this up, use the Hidden field type. Then you could unhide it using JS if you want, or just read the value out and put it somewhere else on the page (form.getValues().Email).
Thanks Sanford. I can easily set the Form Editor to pull the URL param for it's value. But ideally i still want that field to be visible for the customer, as we want the customer to view their email address and confirm that is the one they wish to unsubscribe.
is there a way for the field to still be visible and also accept URL param?
Sure. An easy approach is by having a regular Rich Text widget in addition to the hidden text field. Copy the value into the widget so you can style it however you want.
Just takes a little line of JS:
MktoForms2.whenReady(function(form){
form.getFormElem()[0].querySelector('#showEmail').innerHTML = form.getValues().Email;
})
Demo here: http://pages.vaneck.com/simple-unsubscribe.html?Email=chantell@tapsell.com
Fabulous, thank you so much.
Sanford Whiteman, is this code entered inline where the value should be placed within the HTML? For example, did you enter this as follows:
You're managing subscriptions for
<srcript>MktoForms2.whenReady(function(form){
form.getFormElem()[0].querySelector('#showEmail').innerHTML = form.getValues().Email;
})
</script>
.
No, you can put the script anywhere. '#showEmail' refers to a SPAN with id="showEmail" that you insert to hold the value.
Still no luck. Here's what I have in the HTML snippet on the landing page:
<script type="text/javascript">
MktoForms2.whenReady(function(form){
form.getFormElem()[0].querySelector('#showEmail').innerHTML = form.getValues().Email;
})
</script>
And here's the rich-text:
Please confirm your approval for <span id="showEmail"> </span> to attend the event:
hey Sanford,
I was also trying to get this to work with no success. I added the Code above to the Form's reich text editor and it seemed to get commented out with // [CDATA each time i saved.
However i was able to use the HTML widget in the unsub landing page level and it was appearing in the source code of the page. But it still does not reveal the email value with passed on the URL param thru the hidden field. I think it may have something to do with the span id you described above. Can you elaborate if I need to add a span somewhere and where to add it?
Here is my Landing page: Quora for Business - Unsubscribe
I was also trying to get this to work with no success. I added the Code above to the Form's reich text editor and it seemed to get commented out with // [CDATA each time i saved.
That's actually fine, it's not commenting out all the code. Marketo still inserts the ancient CDATA wrapper even though it's not needed in any modern browser.
The key here is you need