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

Translate First Namen and Last Name in contact form

Go to solution Solved by paul2009,


I'm using square space for the first time and I have never coded before so I hope you guys can help me.  I'm trying to translate the hard coded labels in the contact form on our web page https://padelakersberga.com/kontakt-1

I tried with this code, but it didnt work:

  if (document.querySelector("#name-yui_3_17_2_1_1553888888520_3744")) {
    document.querySelector('.field-element field-control[name="fname"]').placeholder = 'Förnamn';
    document.querySelector('.field-element field-control[name="lname"]').placeholder = 'Efternamn';    

Maybe I'm way off here, the code could be totally wrong, but I found some similar code while searching for answers so this is what I came up with. 


Link to post
  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

Popular Posts

Good attempt! Try adding this to Settings > Advanced > Code Injection > Footer instead: <script>     if (document.querySelector('.form-item.fields.name')) {     document.querySelect

1 answer to this question

Recommended Posts

  • 0

Good attempt! Try adding this to Settings > Advanced > Code Injection > Footer instead:

  if (document.querySelector('.form-item.fields.name')) {
    document.querySelector('.field.first-name .caption .caption-text').innerText = 'Förnamn';
    document.querySelector('.field.last-name .caption .caption-text').innerText = 'Efternamn'; 

Note that like most answers, this is a simplified example and will only modify the captions on the first name field within a form.

  If this helps you, please click "Like" below  ⬇️

Hi, I'm Paul, founder of SF Digitalbuilding the features that Squarespace didn't include. Pick dates in any format, show prices in other currencies, take orders without payment or improve your cartI value honesty, integrity, transparency and respect. Links in my posts may refer to SF Digital products or may be affiliate links.  Squarespace. I've been a loyal supporter of the platform since 2007. 

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...