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>
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? All CS:GO News in One Place – TLDR Newsletter

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: Webflow - The TLDR | CS:GO Newsletter with Double the Hot Takes in Half the Time

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!