Jump to content

A way to access onClick or onSubmit on a form

Recommended Posts

Posted

Im wondering what the correct code is for accessing the onclick functionality of a form submit button, so I can edit the error messages.

Ive tried https://www.silvabokis.com/squarespace-tips/dynamic-translation-of-squarespace-form-error-messages

but while the .click works with p tags or img tags it doesn't respond with the submit button using its class or tag.

code Ive tried

  $(document).ready(function(){
    var btn = document.getElementsByClassName([the_actual_button_id]);
    
      $(btn).click(function(){
    alert("The paragraph was clicked.");
  });

 });

site: https://calliope-tarpon-dbkt.squarespace.com

pw frank

 

Thanks!

 

 

  • Replies 0
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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.