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>
2 Likes

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

Hey @Diarmuid_Sexton I must be a complete noob because I can’t get your script to work. Mind taking a look and tell me what I’m doing wrong? https://readtldr.gg/home-v2

Try follow the guides here.

Have you a UseBasin account set up?

Thanks for sharing the guide.

I’ve integrated with a form from ActiveCampaign (email service provider). I swapped the UseBasin URL to ActiveCampaign in your script but unfortunately I still cannot seem to make it work.

Here’s my form: https://preview.webflow.com/preview/tldr?utm_medium=preview_link&utm_source=designer&utm_content=tldr&preview=5e1f24e27f00450d17825efce6e8a223&pageId=61367dec8d9826066b807dd3&workflow=preview

Sorry man, I don’t have time to look into your issue.

Keep playing around with it - you’ll figure it out.

And good luck.

1 Like

no problem man, appreciate your contribution so far!