Hello, our unsubscription form has been creating new people in the database. Although their unsubscribe option has been set to true, a new record is being created. Another issue I've been facing is the form prefill not working even though its been enabled
Has anybody been facing this issue? and what have you been doing to mitigate this?
Hello, our unsubscription form has been creating new people in the database. Although their unsubscribe option has been set to true, a new record is being created. Another issue I've been facing is the form prefill not working even though its been enabled
Has anybody been facing this issue? and what have you been doing to mitigate this?
This is standard behavior. As long as the form has a user-modifiable Email Address field, it‘s the same as any other form. You can keep the Email Address off the form and display only a {{lead.Email Address}} token instead, and if the token is empty disable the Submit button.
This of course means a person needs to have an associated Munchkin session and/or receive a Marketo email in order to unsubscribe themselves — otherwise, the token will be empty. If your business requires that anybody be allowed to unsubscribe without proof of identity, though, then you’re back where you started and you must have the text input.
Another issue I've been facing is the form prefill not working even though its been enabled
There’s not enough information here to give any suggestions.
Hi Sanford, Thanks for getting back!!
How do I keep the email address off of the form and use a {{lead.Email Address}} token and if the token is empty disable the Submit button? Does this need to be hardcoded on the form or the subscription landing page?
Thanks in advance!
How do I keep the email address off of the form and use a {{lead.Email Address}} token and if the token is empty disable the Submit button?
Like this:
<div>Your email address is <output class="lead-token" data-token-for="Email Address">{{Lead.Email Address}}</output></div>
<script>
MktoForms2.whenReady(function(mktoForm){
let formEl = mktoForm.getFormElem()[0],
submitButtonEl = formEl.querySelector(".mktoButton[type='submit']");
let hasEmptyEmailToken = document.querySelector("output.lead-token[data-token-for='Email Address']:empty");
if( hasEmptyEmailToken ) {
submitButtonEl.disabled = true;
}
});
</script>
Does this need to be hardcoded on the form or the subscription landing page?
It should be in a separate script on the LP.