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
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
  • 2 years later...
On 6/7/2024 at 4:36 PM, benja said:

Hey @tuanphan can you help me with my page?
I tried the code above to change the text. It worked perfect on the contact page:
https://emu-apricots-sgll.squarespace.com/en/contact

But I'm struggling to set it up in the footer. I have set up a second footer for the German language, where the text should remain.

Use this code to bottom of Code Injection > Footer

<script>
   $(document).ready(function() {
	$('section[data-section-id="665d689647a3b17362430d33"] 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

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

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.