Streaming live at 10am (PST)

How to disable auto redirect from endpoint

Hi, all.

I created a landing page with a form in Webflow.
The form is using POST method with
How do I disable the redirection to the Thank you page?

I could disable the Thank You page redirection using UseBasin form endpoint. But have no idea how to do it using

Below are the code used to disable UseBasin form endpoint while keeping Webflow form success and error message. I would need it to work with

<script type="text/javascript">
//apply only to forms with the action pointing to Basin
  form = $(el);
    //stop the form from submitting
    form = $(;
    //get the form's action parameter and add ".json" to the end
    action = form.attr('action') + '.json';
    //submit the form via ajax
      url: action,
      method: "POST",
      data: form.serialize(),
      dataType: "json",
      success: function(data){
          //successful submission - hide the form and show the success message
          parent = $(form.parent());
        } else {
          //failed submission - log the output to the console and show the failure message
      error: function(){
        //failed submission - show the failure message

Why not follow their example?

I tried following that. But it doesn’t show the native success or error message. Anyway, I got it worked somehow. Not sure if it’s entirely correct, but it works. Sharing it below. :wink:

<script type="text/javascript">
  var action = $(this).attr("action");
  var data = {};
  $(this).serializeArray().map(function(x){data[] = x.value;}); 
    type: "POST",
    url: action,
    data: JSON.stringify(data),
    contentType: "application/json",
    headers: {
      "Accept": "application/json"
  }).done(function() {
  }).fail(function() {
1 Like