I have a custom bit of javascript which redirects upon form submission and populates an external form via the URL query string.
This is all working fine BUT Webflow is not actually submitting the form entry to the database. Is there some kind of delay or something I should be adding to ensure this happens? Appreciate your help!
Existing code below:
<script>
var formEle = document.getElementById('wf-form-email-hero');
formEle.addEventListener("submit", function(evt) {
evt.preventDefault();
var textEle = document.getElementById('email-hero');
var email = textEle.value;
var url = 'https://demo.com/sign-up?email=' + email;
window.open(url, "_self");
});
</script>