Hi, I'm hoping someone can tell me if the following code could be the reason why our form would be firing twice and creating duplicate records in our instance? We implemented this a couple of months back on our BounceX pages. I'm trying to pin down what is causing duplicated leads through these forms. Thanks.
MktoForms2.loadForm("//app-abXX.marketo.com", "XXX-XXX-XXX", XXXX, function(form) {
form.onSubmit(function(){
var sEmail = form.vals().Email;
var chunks = sEmail.split('@');
var emaildomain = chunks[1];
form.vals({"Email":sEmail.toLowerCase(),"acbj_emailDomain__c":emaildomain.toLowerCase()});
});
});
Please highlight your code using the Advanced Editor's syntax highlighter and include a link to an example page so other code can be inspected.
Then we'll continue.
Sure, thanks.
There's no reason for that code alone to cause duplicates. Please link to an example page.
(I would caution that you should be using toLocaleLowerCase(), or better yet not changing the case of the mailbox/left-hand-side at all.)
Sure, thanks.
So where's the link?
Took it down, having spambot issues. Planing on integrating google reCAPTCHA tomorrow. thanks!
Have the code ready, will let you know.
Thanks.