Automatically editing firstname and lastname before submission

Hi,
I’d like to add some php to the WordPress plugin to ensure that all names start with a capital letter and continue in lower case. Too many people seem to enter their name as john or jOHN, or JOhn and when that goes into an automation it looks unprofessional and very obviously automated not personalised.

I can do this in PHP using:
$firstname = strtolower($firstname);
$firstname = ucfirst($firstname);

Where could I insert this in the plugin code in wordpress?

Alternatively is it possible to do this somewhere in an automation, or could it be added universally (surely everyone would want this?)

Apologies for posting in the developers’ forum when I am not a developer, it seemed like the right place for it.
Thanks, Joe Halstead

1 Like

You can just do this by using modifiers on the personalisation tag in your emails.

So, for example, instead of %FIRSTNAME% use %FIRSTNAME|TITLECASE% and it will capitalise the first letter and put the rest of the name in lower case.

More details here: http://www.activecampaign.com/help/personalization-tags/

Ian

1 Like

Hi Ian,

Thanks a lot for that, very helpful.

If the developers are listening, this is a very useful bandaid but not an actual fix for bad data.

Joe

Except that not all names actually start with an uppercase letter, for example my friend ‘Paul de Gelder’. So forcing things uppercase isn’t necessarily the answer either.

Would Paul de Gelder prefer pAul de GElder as many of my clients would type on their phone or Paul De Gelder?

Forcing things to a format is the answer unless you want to give me an extra 2 hours a day to do it manually.

I happy for you to take two hours a day to fix in manually