When you have name fields in your form, you can force InfoPath to autoformat the capitalization of those fields so that the first letter of the name is properly capitalized. Thanks to S.Y.M. Wong-A-Ton’s article for the tip. Here are the step by step instructions for setting the default format on a name field. Use this on any control you need proper case.
As you can see, I have the two name fields in my form: First Name and Last Name.
Double-click the First Name field to launch the Text Box Properties dialog box. Then click the Function button to the right of the Default Value property.
Copy and paste the following code in the Formula area
concat(translate(substring(., 1, 1), “abcdefghijklmnopqrstuvwxyz”, “ABCDEFGHIJKLMNOPQRSTUVWXYZ”), substring(., 2, string-length(.) – 1))
Your window should look like this. Click OK twice.
- Test the field by using Preview mode.