Jump to content

Custom Text In Search Bar

Recommended Posts

  • 2 months later...
8 hours ago, cherylr said:

I am trying to do this as well.

Here's a link to my site: https://mark-russell-o43o.squarespace.com/

Add to Code Injection Footer

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$('.sqs-search-page-input input').attr('placeholder','Tuan Tuan Tuan Tuan Tuan');
</script>

 

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 1 month later...
  • 1 month later...
On 2/2/2020 at 7:30 PM, tuanphan said:

Add to Code Injection Footer


<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$('.sqs-search-page-input input').attr('placeholder','Tuan Tuan Tuan Tuan Tuan');
</script>

 

Hi Tuan!

I am also looking to do this, however my pages will have multiple search boxes that all need to have different display text. For example, the left one could say "Search by Neighborhood" and the right one could be "Search by Address". How can I target them individually? I assume I need to reference the yui ids, but I'm not exactly sure how to tackle that. Maybe you can help? Please and thank you!

The url is https://crocodile-pigeon-9mmr.squarespace.com/scratch

 

Link to comment
21 hours ago, PrismaVisual said:

Hi Tuan!

I am also looking to do this, however my pages will have multiple search boxes that all need to have different display text. For example, the left one could say "Search by Neighborhood" and the right one could be "Search by Address". How can I target them individually? I assume I need to reference the yui ids, but I'm not exactly sure how to tackle that. Maybe you can help? Please and thank you!

The url is https://crocodile-pigeon-9mmr.squarespace.com/scratch

 

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$('div#block-yui_3_17_2_1_1588863336914_16498 .sqs-search-page-input input').attr('placeholder','Search mot');
  $('div#block-yui_3_17_2_1_1588863336914_18386 .sqs-search-page-input input').attr('placeholder','Search hai');
</script>

 

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 5/8/2020 at 10:28 AM, tuanphan said:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$('div#block-yui_3_17_2_1_1588863336914_16498 .sqs-search-page-input input').attr('placeholder','Search mot');
  $('div#block-yui_3_17_2_1_1588863336914_18386 .sqs-search-page-input input').attr('placeholder','Search hai');
</script>

 

Thanks so much Tuan! However I've not been able to get this to work. 😞  The content has since been relocated. I did identify and target the new block yui id's but nothing happens. The new environment is 7.1 (it was formerly 7.0) maybe that's why? Does this script have to go somewhere other than the Code Injection Footer when working in 7.1?

The new url is:  https://tomato-lynx-pzwm.squarespace.com/

password: bennythejet

Link to comment
21 hours ago, PrismaVisual said:

Thanks so much Tuan! However I've not been able to get this to work. 😞  The content has since been relocated. I did identify and target the new block yui id's but nothing happens. The new environment is 7.1 (it was formerly 7.0) maybe that's why? Does this script have to go somewhere other than the Code Injection Footer when working in 7.1?

The new url is:  https://tomato-lynx-pzwm.squarespace.com/

password: bennythejet

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$('div#block-yui_3_17_2_1_1589218491243_29604 input').attr('placeholder','Search mot');
  $('div#block-yui_3_17_2_1_1588964900710_39076 input').attr('placeholder','Search hai');
</script>

 

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.