Hi,
Is there a way to customise the Webflow form action and submission, i.e. make an GET api call, redirect based of that GET result , and STILL submit the captured data to Webflow?
The use case is a postcode checker, where the user enters in a postcode and their email address, the website makes an api call to check if the postcode is valid. If so redirect to A, if not redirect to B. Their inputted information is posted to Webflow regardless.
This is what I have so far from looking across the Webflow forums and piecing it together. I’m making the API call successfully, but the submitted form details are not submitting to Webflow! Does anyone know why?
// Overide webflow form submission
var Webflow = Webflow || [];
Webflow.push(function () {
// === Custom Form Handling ===
makeWebflowFormAjax($("form"));
$(document).off('submit');
// new form handling
$('form').submit(function (evt) {
evt.preventDefault();
});
});
Thanks in advance!