Streaming live at 10am (PST)

Form not submitting to Webflow database (custom JS)

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>

Just tested your code and seems to work fine.

The same is happening for me, I have two other forms in the website and they appear in the database but the last one I created for the blog section does not. I do receive the e-mails when someone subscribes though.