Streaming live at 10am (PST)

Send custom action form, then webflow form explicitly

Hello,

How can we explicitly prevent webflow action to send a form by default, so that we can perform a custom action on that form, then only execute the default webflow action ?

My problem at the moment is that I can’t figure out how to run the webflow action again after having unbind the webflow form handling… :thinking:

Share only link here
Simplified website here

Current JavaScript

var Webflow = Webflow || [];
Webflow.push(function() {

  // 💀 unbind webflow form handling
  $(document).off("submit");

  // 🥶 on submit
  $("#form").submit(function(event) {
    event.preventDefault();
    customAction();
    webflowAction();
  }); // end submit

  // 🍓 custom action
  function customAction() {
    alert("custom action doing nothing 🍓");
  } // end custom()

  // 🥦 webflow action
  function webflowAction() {
    alert("webflow action sending form 🥦");
    $(document).on("submit");
    return true;
  } // end custom()
}); // end webflow.push()