Jump to content

Squarespace 7.1 - Replace default placeholder text inside Search block

Go to solution Solved by Beyondspace,

Recommended Posts

  • Solution
11 hours ago, alanx said:

Site URL: https://steven.squarespace.com/clients

Hello, I'm trying to replace the default placeholder text inside the Search block to something else using custom CSS.

Thank you in advance.

It may require custom script, add this to footer

<script>
(function() {
document.querySelector("input.search-input").setAttribute("placeholder", "This is your Search Input");
})()
</script>

image.png.c01accc60233a2d29deb9d570da28ae8.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget 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
20 minutes ago, bangank36 said:

It may require custom script, add this to footer

<script>
(function() {
document.querySelector("input.search-input").setAttribute("placeholder", "This is your Search Input");
})()
</script>

image.png.c01accc60233a2d29deb9d570da28ae8.png

 

Thanks so much!

I thought it was possible with something like:

blah-blah-blah:after {
	content: 'custom text';
}

 

Anyway, your solution works.

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.