The point of matching the typed in Purchasing Name to the Applicant name is that we're following state guidelines for a product that we're selling. Can't really get into that right now.
I have PHP for the initial part of the application that allows for apostrophes and hyphens, and if the last name has an apostrophe or hyphen in it, that it doesn't make the second part of the last name lowercase:
$temp = strtolower("<#policyholder.last_name#>");
$temp = join("'", array_map('ucwords', explode("'", $temp)));
$temp = join("-", array_map('ucwords', explode("-", $temp)));
$result = $temp;