Jump to content

Change placeholder text for newsletter form

Recommended Posts

On 12/14/2021 at 8:16 AM, CDAquestion said:

Site URL: https://www.cdamovement.org

Looking for CSS customization to change the placeholder text in the newsletter form on the homepage to change from "First Name / Last Name / Email Address" to "Name / CDSBC Number / Email." Much appreciate any help!

Add to Settings > Advanced > Code Injection > Footer

<script>
(function() {
document.querySelector(".first-name input").setAttribute("placeholder", "Name");
document.querySelector(".last-name input").setAttribute("placeholder", "CDSBC Number");
document.querySelector(".email input").setAttribute("placeholder", "Email");
})()
</script>

image.thumb.png.3ef5220ea6fd9439d1402b4ab98533eb.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 1 year later...
28 minutes ago, mbockmaster said:

I'm attempting to use this same code on my form, but I suspect that with the form updates, something has changed as it's no longer working. Do you know what the issue could be?

The earlier posts in this thread were posted before Squarespace changed Form Blocks in 2023. They are now built using React. See earlier threads for more background. 

Did this help? Please give feedback by clicking an icon below  ⬇️

About me: I'm Paul. A SQSP User for 18 yrs, I joined Circle when it launched in 2016 and have been a Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL, providing expertise and extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee fuels my work.

Book paid help with a Squarespace Domain

Link to comment

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.