Jump to content

Posting form data to external API

Recommended Posts

I've added jquery to my site, and I'm trying to override the form submission to post the form to an external api via Ajax but I'm not having any luck. 
I tried adding a listener to the submit but but it didn't trigger.

$('input[type="submit"').on( "click", function() {
  alert("Button triggered");
});

Can anyone help out? Thanks.

Link to comment
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.