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 Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword HighlighterIf you find my answer fit your need, 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