Streaming live at 10am (PST)

Third Party Form Service - Disable Submit Button & Show Waiting Text

Below is the code to disable the submit button while the form is submitting to prevent multiple submissions when using a third party service (i.e. NOT Webflow - as these can sometimes be slow to load)

It also gets the “Waiting Text” - i.e. “Sending…” from the Submit Button in Webflow and displays it while the form is submitting.

image

<script>
  // DISABLE THE SUBMIT BUTTON ONCE A FORM HAS BEEN SUBMITTED
  $("#wf-form-Job-Application").submit(function (e) {
    $(e.target).find('input[type=submit]').attr("disabled", true);
    var dataWait = $(e.target).find('input[type=submit]').attr("data-wait");	
    $(e.target).find('input[type=submit]').attr("value", dataWait);	
    return true;
  });
</script>
1 Like

Thanks @Diarmuid_Sexton ! Works like a charm. Great solution that works with Usebasin and redirect page. :smile: :clap: