LMJ
-
Posts
4 -
Joined
-
Last visited
Content Type
Forums
Gallery
Blogs
Events
Store
Downloads
Profiles
Posts posted by LMJ
-
-
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...
If you inspect the page outside of the editor, it is a bit easier to find:
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"> -
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!
-
Is this still open? Would love some insight into the correct class names
Custom form validation (intercepting the form submission)
in Customize with code
Posted
Okay thanks for the info, thats really helpful. Thats kind of annoying because so much of the form is not screen reader optimised.