Jump to content

LMJ

Member
  • Posts

    4
  • Joined

  • Last visited

Posts posted by LMJ

  1. 2 hours ago, creedon said:

    I do not have a solution but an observation.

    The techniques discussed in this thread will no longer work since Squarespace redesigned forms on Oct. 8th 2023.

    Squarespace moved from simple standard web forms to using React forms. React forms are much more difficult to impossible to customize as React ignores how standard web forms work and use their own methods to handle things.

    Okay thanks for the info, thats really helpful. Thats kind of annoying because so much of the form is not screen reader optimised.

  2. On 11/27/2020 at 5:41 AM, summitdigitaluk said:

    Hi Rodrigo,

    My example refers to a Form Block. When you are editing the page you can find the data-form-id attribute by inspecting the code and looking for the correct form element. It can be a bit tricky whilst editing the page because there are extra elements laying over the top of all the blocks on the page which Squarespace use to show the edit buttons etc...

    Screenshot-2020-11-27-at-10_07_56.thumb.jpg.2a88e364ef7191bcc340ff45d79f3e77.jpg

    If you inspect the page outside of the editor, it is a bit easier to find:

    Screenshot-2020-11-27-at-09_59_02.thumb.jpg.9ed9e1cfd03db0fc5b48facd6e836487.jpg

    These examples are from 2 different websites incase you were wondering why the ID is different!

    I hope this helps.

    My form code has no data-form-id anywhere, nor the onsumbit js. is there something special I need to do?

    what it currently shows

    <div class="form-wrapper">
    <form autocomplete="on" class="react-form-contents" novalidate="" data-success-redirect="">
    <div></div>
    <div class="field-list">
  3. 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!

     

     

×
×
  • 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.