Is there a way to auto cap the first character of the First Name and Last Name fields like the auto correct/format for the phone number field? Occasionally we get customers who lower case their names which makes our replies look awkward. Thanks!

    NaturalNine

    There is no auto-correction but you can add a Regex Validator with something like /^[A-Z]{1}[^ ]+ [A-Z]{1}[^ ]+$/ that says the string "must start with capital letter, followed by any character except a space, followed by a space, followed by another capital letter, followed by any character except a space until the end of the string". Then you can add a Validator Message of "Name must be capitalized" or something. The caveat is the above regex assumes "First Last" format. If they use "First Middle Last" or something else it will fail. You can always adjust the regex to your liking.

    Cheers.

    a year later

    Hi Kevin - getting back to this. I only really need the first name capitalized. What file would I put this JavaScript example that capitalizes the first letter on change?

    `<input type="text" id="myInput">

    <script>
    // Get the input element
    const input = document.getElementById('myInput');

    // Add an event listener for the 'change' event
    input.addEventListener('change', function() {
    // Get the current value of the input
    const value = this.value;

    // Capitalize the first letter
    const capitalizedValue = value.charAt(0).toUpperCase() + value.slice(1);
    
    // Update the input value with the capitalized version
    this.value = capitalizedValue;

    });
    </script>
    `

    Write a Reply...