Jump to content

Style fields to only capitalize the first word

Go to solution Solved by tuanphan,

Recommended Posts

Hi!

I've added a newsletter block to my homepage. I'm collecting first name and email address. I would like to only capitalize the first word, but not the second ("First name," not "First Name;" "Email address," not "Email Address"). Does anyone know how to do this?

Many thanks!

Edited by Aurora
Link to comment
On 9/5/2023 at 11:29 AM, tuanphan said:

Hi,

Can you share link to homepage? We can check easier

Hi! Thank you for replying! My site isn't live yet. Would it help if I sent a screenshot of the section in question? I'm note not sure what you mean when you say that you can check easier.

Many thanks!

Bildschirmfoto 2023-09-06 um 14.30.00.png

Link to comment
20 hours ago, Aurora said:

Hi! Thank you for replying! My site isn't live yet. Would it help if I sent a screenshot of the section in question? I'm note not sure what you mean when you say that you can check easier.

Many thanks!

Bildschirmfoto 2023-09-06 um 14.30.00.png

You can follow this to share url

 

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
  • 4 weeks later...
Posted (edited)

Hi,

I'm still looking for a solution for this. I'd like the first field to say "First name" and the second field "Email address."

I'll have a similar newsletter signup on each of my blog posts as well. Is it possible to assign a change that will affect all newsletter signups on my entire website?

Website: https://www.kristinkuehn.com

Password: 2eRFn7gQ

Many thanks!

Edited by Aurora
Link to comment
  • Solution
On 10/3/2023 at 3:03 PM, Aurora said:

Hi,

I'm still looking for a solution for this. I'd like the first field to say "First name" and the second field "Email address."

I'll have a similar newsletter signup on each of my blog posts as well. Is it possible to assign a change that will affect all newsletter signups on my entire website?

Website: https://www.kristinkuehn.com

Password: 2eRFn7gQ

Many thanks!

Add this code to Last Line in Website Tools (under Not Linked) > Code Injection > Footer

<script>
  jQuery(document).ready(function($){
  $('input.newsletter-form-field-element[type="text"]').attr('placeholder','First name');
  $('input.newsletter-form-field-element[type="email"]').attr('placeholder','Email address');
})
</script>

image.thumb.png.9cd9bb8731d790c3d6159704c262ed98.png

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
Posted (edited)
8 hours ago, tuanphan said:

Add this code to Last Line in Website Tools (under Not Linked) > Code Injection > Footer

<script>
  jQuery(document).ready(function($){
  $('input.newsletter-form-field-element[type="text"]').attr('placeholder','First name');
  $('input.newsletter-form-field-element[type="email"]').attr('placeholder','Email address');
})
</script>

image.thumb.png.9cd9bb8731d790c3d6159704c262ed98.png

Thank you! It's working on my blog posts, but not on the homepage. Why I don't know...

Edited by Aurora
Link to comment
On 10/6/2023 at 3:33 PM, Aurora said:

Thank you! It's working on my blog posts, but not on the homepage. Why I don't know...

Where did you add the code? Can you take a screenshot

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

Hi, @tuanphan  is it possible to get this working on a contact form for the first name, last name, and phone fields? I've attempted to take the code provided here in this thread and customize it to my needs and it's running without errors (with script injected in the footer), but the placeholders aren't being updated.

Website: jermtoostrongfitness.com

Someone mentioned on another thread that the form had been rewritten on SS's end and needed react-friendly code. Do you know anything about that?

Thanks!

Link to comment
On 10/12/2023 at 7:20 AM, Njserg said:

Hi, @tuanphan  is it possible to get this working on a contact form for the first name, last name, and phone fields? I've attempted to take the code provided here in this thread and customize it to my needs and it's running without errors (with script injected in the footer), but the placeholders aren't being updated.

Website: jermtoostrongfitness.com

Someone mentioned on another thread that the form had been rewritten on SS's end and needed react-friendly code. Do you know anything about that?

Thanks!

Don't remove any code in your current code. Add this to Last Line in Code Injection > Footer

<script>
  jQuery(document).ready(function($){
  $('.first-name input').attr('placeholder','First name');
  $('.last-name input').attr('placeholder','Email address');
     $('.phone input').attr('placeholder','Enter phone');
})
</script>

image.thumb.png.8b99034813ee0cdfe5c7498869511fbe.png

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.