Jump to content

How to translate first name and last name in contact form

Recommended Posts

Add to Home > Design > Custom CSS

/* First name */
.field.first-name .caption-text {
    visibility: hidden;
}
.field.first-name .caption-text:before {
    visibility: visible;
    content: "Voornaam";
}
/* last name */
.field.last-name .caption-text {
    visibility: hidden;
}
.field.last-name .caption-text:before {
    visibility: visible;
    content: "Achternaam";
}

 

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
1 hour ago, DanielHenriksen said:

Thank you for the quick response.

It works to some extent, as it translates what i need, but the translation now occurs on both my danish and english contact page. How can i set it up so it only translates the danish version?

Add to Page Settings > Advanced > Header (if you use Personal Plan, you can add Code Block)

<style>
  /* First name */
.field.first-name .caption-text {
    visibility: hidden;
}
.field.first-name .caption-text:before {
    visibility: visible;
    content: "Voornaam";
}
/* last name */
.field.last-name .caption-text {
    visibility: hidden;
}
.field.last-name .caption-text:before {
    visibility: visible;
    content: "Achternaam";
}
</style>

 

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
4 hours ago, DanielHenriksen said:

I appreciate the effort, but it still makes it in danish on both the english version of the contact page and the danish version. I would like to keep it in english on the english contact page.

WHERE did you add?

Add to Page Settings > Advanced > Header

The code inserted in Page Header only runs on that page, and does not affect other pages.

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
  • 1 year later...
On 5/24/2020 at 6:32 PM, tuanphan said:

Add to Home > Design > Custom CSS

/* First name */
.field.first-name .caption-text {
    visibility: hidden;
}
.field.first-name .caption-text:before {
    visibility: visible;
    content: "Voornaam";
}
/* last name */
.field.last-name .caption-text {
    visibility: hidden;
}
.field.last-name .caption-text:before {
    visibility: visible;
    content: "Achternaam";
}

 

Is it possible to change the error form Field? It shows in English 

Screenshot.jpg

Link to comment
  • 3 months later...
On 5/25/2020 at 12:32 AM, tuanphan said:

Add to Home > Design > Custom CSS

/* First name */
.field.first-name .caption-text {
    visibility: hidden;
}
.field.first-name .caption-text:before {
    visibility: visible;
    content: "Voornaam";
}
/* last name */
.field.last-name .caption-text {
    visibility: hidden;
}
.field.last-name .caption-text:before {
    visibility: visible;
    content: "Achternaam";
}

 

Thanks Alot. Worked perfect for me aswell

Edited by Andre_99
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.