This conversation has been locked due to inactivity. Please create a new post.
 
     
     
    
            
          
This conversation has been locked due to inactivity. Please create a new post.
           
        
How does one update to use camelcase in standard using out of box updating html?
<td style="padding-top:10px;padding-bottom:20px;padding-left:10px;font-size:18px;color:#394f67;vertical-align:top;line-height:24px;"><span style="padding-top:10px;padding-bottom:10px;padding-left:10px;font-size:18px;color:#394f67;vertical-align:top;line-height:24px;">Hello, <span class="acr-field nl-dce-field" data-nl-expr="/context/rtEvent/ctx/recipientFirstName" data-nl-type="string" contenteditable="false">Guest First Name (recipientFirstName)</span>!<br>
<br>
Welcome! xxxx xxxxx xxxx xxxx!</span></td>
If recipientFirstName comes in all caps or lowers, can this be adjust to camelcase inside html?
Solved! Go to Solution.
Views
Replies
Total Likes
          
        
Create a perso block like below and call it in your email
function toSmartCase(context.profile.firstName)
{
  var strLower = str.toLowerCase(context.profile.firstName);
  var nChar    = strLower.length;
  for (var i=0; i < nChar; i++)
    if ( i == 0 || strLower.charAt(i-1) == ' ' || strLower.charAt(i-1) == '-' )
      strLower = strLower.substring(0, i) + strLower.charAt(i).toUpperCase() + strLower.substring(i+1);
  return strLower;
}Thanks,
David
 
Views
Replies
Total Likes
          
        
Create a perso block like below and call it in your email
function toSmartCase(context.profile.firstName)
{
  var strLower = str.toLowerCase(context.profile.firstName);
  var nChar    = strLower.length;
  for (var i=0; i < nChar; i++)
    if ( i == 0 || strLower.charAt(i-1) == ' ' || strLower.charAt(i-1) == '-' )
      strLower = strLower.substring(0, i) + strLower.charAt(i).toUpperCase() + strLower.substring(i+1);
  return strLower;
}Thanks,
David
 
Views
Replies
Total Likes
           
        
Views
Replies
Total Likes
           
        
Views
Replies
Total Likes
           
        
Views
Replies
Total Likes
 
					
				
				
			
		
Views
Likes
Replies