Jump to content

How can I change or delete the captions "First Name" and "Last Name" in forms?

Recommended Posts

This topic was originally posted here in 2013: 

I had the same issue with translating from English to French on the contact form on my bilingual site. The original custom code workarounds that were provided worked for me last year, but at some point afterwards the form reverted back to English. Squarespace help confirmed the only way to "fix" this is through custom code. Would anyone know of any new or revised code I can inject to make this work? I want "first name" to read "prénom" and "last name" to read "nom". Thank you! 

Link to comment
  • Replies 6
  • Views 1.9k
  • Created
  • Last Reply
  • 1 year later...

Hello @tuanphan,

How can I do this? with CSS only? and only for the English form?

I have used this from Paul2009, but it didn't work.

<script>  
  if (document.querySelector("#name-yui_3_17_2_1_1559593002966_3555")) {
    document.querySelector('.field.first-name .caption .caption-text').innerText = 'First name';
    document.querySelector('.field.last-name .caption .caption-text').innerText = 'Last name'; 
  }
</script>

in the PAGE HEADER CODE INJECTION of a certain page in order to only change it there, but nothing happened. Then I went on and put it onto the global footer code injection and then it change BUT unfortunately for all pages. I would like to have it only on my English contanct form.

Do you know how I can accomplish that? I am working on stelviopartners.com

Thank you very much, cris

Link to comment
2 hours ago, Xbal said:

Hello @tuanphan,

How can I do this? with CSS only? and only for the English form?

I have used this from Paul2009, but it didn't work.

<script>  
  if (document.querySelector("#name-yui_3_17_2_1_1559593002966_3555")) {
    document.querySelector('.field.first-name .caption .caption-text').innerText = 'First name';
    document.querySelector('.field.last-name .caption .caption-text').innerText = 'Last name'; 
  }
</script>

in the PAGE HEADER CODE INJECTION of a certain page in order to only change it there, but nothing happened. Then I went on and put it onto the global footer code injection and then it change BUT unfortunately for all pages. I would like to have it only on my English contanct form.

Do you know how I can accomplish that? I am working on stelviopartners.com

Thank you very much, cris

Where is the page's form

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 No-code customisations for Squarespace
🚀 Learn how to rank new pages on Google in 48 hours!

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

Link to comment
On 6/2/2021 at 6:49 PM, Xbal said:

Hello @tuanphan,

How can I do this? with CSS only? and only for the English form?

I have used this from Paul2009, but it didn't work.

<script>  
  if (document.querySelector("#name-yui_3_17_2_1_1559593002966_3555")) {
    document.querySelector('.field.first-name .caption .caption-text').innerText = 'First name';
    document.querySelector('.field.last-name .caption .caption-text').innerText = 'Last name'; 
  }
</script>

in the PAGE HEADER CODE INJECTION of a certain page in order to only change it there, but nothing happened. Then I went on and put it onto the global footer code injection and then it change BUT unfortunately for all pages. I would like to have it only on my English contanct form.

Do you know how I can accomplish that? I am working on stelviopartners.com

Thank you very much, cris

It looks like you solved?

image.thumb.png.eb4c850ef6b35ad1f5bff75b41ec9ea7.png

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

Archived

This topic is now archived and is closed to further replies.


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