SOLVED

Re: Can you capitalize lead name token in email?

Go to solution
Anonymous
Not applicable
If a lead enters their name in lowercase (john doe), how can I capitalize that token in an email (John Doe)? Is this something that can be fixed in form settings or should it be fixed in the HTML? I'm currently trying to fix it (unsuccessfully) in the HTML using the following:
<p><span class="text-transform:capitalize">Hey {{lead.First Name:default=there}}</span>,</p>

I have no coding background, so the HTML could be wrong. Any help is greatly appreciated!
 
Tags (1)
1 ACCEPTED SOLUTION
SanfordWhiteman
Level 10 - Community Moderator
@Tyler G also, the correct CSS would be 

style="text-transform: capitalize;"

However, this will be rendered in Outlook Web Access as if you used 'uppercase' (don't ask me why -- 'capitalize' has no kind of security implication I can think of).  By contrast, it works in Gmail.  YMMV.

 

View solution in original post

26 REPLIES 26
Ayush_Aggarwal1
Level 2

Hi Sanford Whiteman‌,

Thank you for sharing it. This is helpful and it worked. However, even after adding ## in the end of the code, the whitespace still appears. Can you help me please on how to remove the extra spaces?

Regards,

Ayush Aggarwal

SanfordWhiteman
Level 10 - Community Moderator

If your code is exactly like the above, the whitespace isn't coming from Velocity. 

Noah_Wong1
Level 2

Yup, that worked. Thanks again!

Justin_Cooperm2
Level 10

Did you check the checkbox on the right side of the velocity script and does the lead have a first name?

Noah_Wong1
Level 2

Yes, to both. Unfortunately no luck.

Kristen_Malkov1
Level 8

If you can do this, I'd love to know! 

Otherwise, I tend to take the time to standardize data using CRM fusion in Salesforce.