MktoForms2.whenReady(function(form){
var formEl = form.getFormElem()[0];
form.onSuccess(function(vals,tyURL){
var tyLoc = document.createElement("a");
tyLoc.href = tyURL;
tyLoc.className = "om-trigger-conversion mchNoDecorate";
formEl.appendChild(tyLoc);
tyLoc.click();
return false;
});
});
Do i get rid of this??
<script>
MktoForms2.whenReady(function(form){
var formEl = form.getFormElem()[0],
submitEl = formEl.querySelector('input[type="submit"]');
submitEl.className += ' om-trigger-conversion';
});
</script>
Yes, you aren't using that method. But please if posting code always use the syntax highlighter in Advanced Editor:
Hi Sanford thanks for this.
just to confirm the full code I am using is the code you added with 11 lines? Sorry just wanted to make sure.
Thanks again
Yes.
Thanks again
Sorry Sanford I tried the following but i'm obviously doing something wrong...
<script src="//app-lon08.marketo.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_1145"></form>
<script>
MktoForms2.whenReady(function(form){
var formEl = form.getFormElem()[0];
form.onSuccess(function(vals,tyURL){
var tyLoc = document.createElement("a");
tyLoc.href = tyURL;
tyLoc.className = "om-trigger-conversion mchNoDecorate";
formEl.appendChild(tyLoc);
tyLoc.click();
return false;
});
});
</script>
Please let me know the URL, and what is "obvious".
Hi Sanford
the URL is
Professional Diploma in Digital Marketing | Study Online in Ireland | Enrol
its basically if you hover over the URL it will show the Optin
Where on that page do you have the code?
If you hover over the URL the form will appear.
I'm asking on what line of what file are you adding the Forms JS custom behaviors code above?