Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
therealmiguel

How to edit / customise search box placeholder text

Question

15 answers to this question

Recommended Posts

  • 0

Add to Home > Settings > Advanced > Code Injection > Footer

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
  window.Squarespace.onInitialize(Y, function(){  
		$(".sqs-search-ui-text-input .search-input::placeholder").html(function() { 
          return $(this).html().replace("Search", "new text");  
    });
	});
</script>

 


You can send your question to my email to get faster answer. / How to Setup Password & Share URL 

-- I'm Tuan. I work for a non-profit project (build free libraries). I check the forum once or twice a day to help out the community. If you don't see me answering your question, you can send it to the email above. There are so many questions every day so I can't answer them all at once, I will try to answer them in the next few days.

Share this post


Link to post
  • 0
1 hour ago, tuanphan said:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> window.Squarespace.onInitialize(Y, function(){ $(".sqs-search-ui-text-input .search-input::placeholder").html(function() { return $(this).html().replace("Search", "new text"); }); }); </script>

Thank you so much @tuanphan. I'm afraid that didn't actually work 😞

Share this post


Link to post
  • 0
On 6/10/2020 at 6:08 PM, therealmiguel said:

Thank you so much @tuanphan. I'm afraid that didn't actually work 😞

 

6 minutes ago, sandrakeus said:

I'm also looking for a solution. The code above doesn't work for me either. I'm on Squarespace 7.0 / Brine.

Try again with

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
  $(document).ready(function() {
	$(".sqs-search-ui-text-input .search-input").attr('placeholder','new text');
});
</script>

 


You can send your question to my email to get faster answer. / How to Setup Password & Share URL 

-- I'm Tuan. I work for a non-profit project (build free libraries). I check the forum once or twice a day to help out the community. If you don't see me answering your question, you can send it to the email above. There are so many questions every day so I can't answer them all at once, I will try to answer them in the next few days.

Share this post


Link to post
  • 0
3 minutes ago, therealmiguel said:

@tuanphan Thank you so much again for your help with the search placeholder query above. 

 

Do you happen to know how to change the colour of the search box border on 7.1:  https://miguelmateas.com/daily-picks

Thanks again! 

Miguel

Add to Home > Design > Custom CSS

.sqs-search-ui-button-wrapper.color-dark .search-input {
    border-color: red;
}

 


You can send your question to my email to get faster answer. / How to Setup Password & Share URL 

-- I'm Tuan. I work for a non-profit project (build free libraries). I check the forum once or twice a day to help out the community. If you don't see me answering your question, you can send it to the email above. There are so many questions every day so I can't answer them all at once, I will try to answer them in the next few days.

Share this post


Link to post
  • 0
19 hours ago, theresa.southern said:

This did not work for me to replace search input placeholder text. Using 7.1. Is that the problem?

Can you share link to page where you use search input? I can check easier.


You can send your question to my email to get faster answer. / How to Setup Password & Share URL 

-- I'm Tuan. I work for a non-profit project (build free libraries). I check the forum once or twice a day to help out the community. If you don't see me answering your question, you can send it to the email above. There are so many questions every day so I can't answer them all at once, I will try to answer them in the next few days.

Share this post


Link to post
  • 0
On 6/15/2020 at 11:36 AM, tuanphan said:

 

Try again with


<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
  $(document).ready(function() {
	$(".sqs-search-ui-text-input .search-input").attr('placeholder','new text');
});
</script>

 

 

This code still doesn't work for me. But I found a solution that worked for me in mean time.

Share this post


Link to post
  • 0
Posted (edited)
On 6/15/2020 at 5:36 AM, tuanphan said:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> $(document).ready(function() { $(".sqs-search-ui-text-input .search-input").attr('placeholder','new text'); }); </script>

Hi @tuanphan

I also can't get this code to work for me - I'd like to just change the Search placeholder text in the top navigation of this website to "Search by Artist": www.williamchambersart.com - Any help would be appreciated!

Edited by Leda_Atomika

Share this post


Link to post
  • 0
Posted (edited)

Hi @Leda_Atomika

Thanks to @tuanphan


@sandrakeus @theresa.southern Please share your website address.
Use this code for your website.

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
 $(document).ready(function() {
	$(".Header-search .Header-search-form-input").attr('placeholder','new text');
});
</script>

Please use the like button if it helps you!

Best,
Leopold

Edited by IXStudio

Ninja Kit Extension: Upgrade your Squarespace website without coding.

YouTube Preview    -    FREE DOWNLOAD

Share this post


Link to post
  • 0
21 hours ago, IXStudio said:

Hi @Leda_Atomika

Thanks to @tuanphan


@sandrakeus @theresa.southern Please share your website address.
Use this code for your website.


<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
 $(document).ready(function() {
	$(".Header-search .Header-search-form-input").attr('placeholder','new text');
});
</script>

Please use the like button if it helps you!

Best,
Leopold

Hi Leopold - Thank you for your answer, however I get a syntax error on <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js">

Apologies if it's a simple fix, I am clueless on this... thank you!

The site is:  Version 7.0– Brine family (Jaunt template) 

Screen Shot 2020-08-27 at 10.41AM.png

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...