Jump to content

Translating Newsletter placeholder on the footer section

Go to solution Solved by tuanphan,

Recommended Posts

Site URL: https://lifelab.world/de/home/

Hello everyone,

I am a bit stuck on updating the Newsletter placeholder on the footer section on the German page as I wanted to update the "Email Address" to just the word "Email".

I have been using these code;

<script>
  if (document.querySelector("div#block-yui_3_17_2_1_1645010424154_28369")) {
    document.querySelector('.newsletter-form-field-element[name="email"]').placeholder='E-post'; 
  }
</script>

and this

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
$(document).ready(function() {
    $("div#block-yui_3_17_2_1_1645010424154_28369 .newsletter-block .newsletter-form-field-element").attr('placeholder','Email');
});
</script>

I injected and tried one, but both did not work. I just done research and applied the block yui of that specific newsletter block on the footer. 

Thank you in advance!

German footer.png

Link to comment
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

On 2/22/2022 at 9:35 PM, Naomi-lifelab said:

Site URL: https://lifelab.world/de/home/

Hello everyone,

I am a bit stuck on updating the Newsletter placeholder on the footer section on the German page as I wanted to update the "Email Address" to just the word "Email".

I have been using these code;

<script>
  if (document.querySelector("div#block-yui_3_17_2_1_1645010424154_28369")) {
    document.querySelector('.newsletter-form-field-element[name="email"]').placeholder='E-post'; 
  }
</script>

and this

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
$(document).ready(function() {
    $("div#block-yui_3_17_2_1_1645010424154_28369 .newsletter-block .newsletter-form-field-element").attr('placeholder','Email');
});
</script>

I injected and tried one, but both did not work. I just done research and applied the block yui of that specific newsletter block on the footer. 

Thank you in advance!

German footer.png

I tried it again and just realized that it did work, but only on the English footer.

I also tried the div#block-yui_3_17_2_1_1603802252295_76331. It is only working on the English footer which is the top footer section and the bottom footer section is in German.

I am almost there, I can't seem to make it work. 😞

newsletter placeholder.png

Edited by Naomi-lifelab
added explanation
Link to comment
  • Solution

Add to Last Line in Code Injection > Footer

<script>
  $(document).ready(function() {
	$('.body-de footer.Footer input').attr('placeholder','Email');
});
</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.