Hello! I am using webflow to quickly recreate nice looking html and css quickly. I made a form with some input fields in webflow. I exported the code from webflow to use all the css, html and animations. But now I don’t want the form to do anything like redirecting the page(thus losing the form data), or submitting the data to webflow. I have my own Javascript function I call with the submit button. But it doesn’t work because the webflow js/jquery keeps redirecting my form page and creating a http request, which I don’t need it to do. How do I disable these functions without breaking the webflow code? ( like interactions )
For any lost souls out there with the same problem.
Put your function with ‘onsubmit’ in the tag.
onsubmit=“function()”
In your function use the following code to prevent the page from generating a request
and resetting your form:
function(){
if(event.preventDefault)
event.preventDefault();
else
event.returnValue = false;
}