Streaming live at 10am (PST)

Send custom action form, then webflow form explicitly


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

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

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

  // 🥦 webflow action
  function webflowAction() {
    alert("webflow action sending form 🥦");
    return true;
  } // end custom()
}); // end webflow.push()
1 Like

Hi Anthony,

Did you find a solution for this? Im trying to do exactly the same thing but having trouble getting the form to submit to Webflow after the custom action?

Why don’t you just call the function you want to perform? If you need the form to be submitted why call preventDefault? :man_shrugging: