Hi, I found this code to capitalize the first letter of a word in a form field:
However, that works great for fields like "First Name" and "Last Name" , where only one word is expected in the form field, but I have form fields that could have more than one word in the like "City" and get names like San Antonio
, and the current script would return San antonio
and I need to capitalize both words.
The code can be placed independently in the attribute section of each form field, so I just need a variant of the code to capitalize more than one word.