oars44 Posted September 30, 2022 Share Posted September 30, 2022 Hey everybody I have a required custom form that my customers fill out and I would like to be able to detect and filter out certain words and phrases such as slurs and hate speech. I have the coding knowledge needed to make a simple text parser but I can't figure out how to connect a script to the custom form. Any ideas? Link to comment
Beyondspace Posted October 1, 2022 Share Posted October 1, 2022 19 hours ago, oars44 said: Hey everybody I have a required custom form that my customers fill out and I would like to be able to detect and filter out certain words and phrases such as slurs and hate speech. I have the coding knowledge needed to make a simple text parser but I can't figure out how to connect a script to the custom form. Any ideas? Squarespace allows you to add javascript code (business plan) to target dom element and apply some action. You can refer how to select Dom Element via the following link: https://www.w3schools.com/js/js_htmldom_elements.asp I recommend using querySelector and querySelectorAll BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
oars44 Posted October 3, 2022 Author Share Posted October 3, 2022 On 10/1/2022 at 6:43 AM, bangank36 said: Squarespace allows you to add javascript code (business plan) to target dom element and apply some action. You can refer how to select Dom Element via the following link: https://www.w3schools.com/js/js_htmldom_elements.asp I recommend using querySelector and querySelectorAll Thank you for the resource and advice, however my current problem is that I can't find a way to insert a code block onto the page where the customer fills out the form. On the store page when clicking on the item preview it leads to a new page not included under the Squarespace Pages section that I seem to have limited editing abilities on. I cannot add any blocks or new sections on it. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment