jordancp
(Jordan-CP)
1
I am trying to add a function to my form submit button but I cannot get it to trigger.
I have done the following
-
Added embedded element → Submit Button
-
Added function in in custom code for the page
Example Page: https://www.cruiseplus.ca/offers/7-night-alaska-roundtrip-vancouver-8)
Read Only Link: Webflow - CruisePlus Travel & Tours
mww
(Milan )
2
Hi @jordancp,
You’re missing the closing ‘}’ for your function. This is resulting in this message in the console: ‘submitTrack is not defined’.
Try replacing the code with this:
<script>
function submitTrack() {
window.pagesense = window.pagesense || [];
window.pagesense.push(['trackEvent', 'submit_success']);
}
</script>
If it’s still not working, we can troubleshoot from there.