• Hello,
    I want that the registration-infos (name, city, country,…) are saved with capitalize first letters in wordpress.
    For example some registers with:
    Name: michael
    City: berlin

    It should be saved in wordpress as “Michael” and “Berlin”.

    Is it possible and how?

    best regards,
    Marc

Viewing 2 replies - 1 through 2 (of 2 total)
  • Yes you can do that with Java Script. What are you using for the registration forms?

    <script language="JavaScript1.2"><!--
    function Capital(value) {
      if (value != "") {
        var firstLetter = value.substring(0, 1).toUpperCase();
        var restOfWord = value.substring(1, value.length);
        value = firstLetter + restOfWord;
      }
    
      return value;
    }
    //--></script>
    
    <input type="text" id="fname" name="fname" value="" onBlur="this.value=Capital(this.value);" />

    When the user clicks on the next field it fires the onBlur which calls the java script.

    Thread Starter Maw.

    (@maw-1)

    thank you. I′m using it in checkout of WooCommerce.
    It′s working fine!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Capitalize first letter for registrations’ is closed to new replies.