Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Default capitalize the first and last name field for questions | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Default capitalize the first and last name field for questions

Default capitalize the first and last name field for questions

Posted: October 4, 2013 at 2:38 pm

Viewing 1 reply thread


Mike Compton

October 4, 2013 at 2:38 pm

Is there a way to have the questions default or force the first letter as capitalized? I would like to have the first name and last name capitalized for people that are registering.


Sidney Harrell

  • Support Staff

October 4, 2013 at 3:49 pm

You’ll have to add a little custom javascript (I added it to the registration_page_display.php template, but you can add it to another js that loads on that page, or your own js file and enqueue it)

<script>
	jQuery.fn.capitalize = function() {
    jQuery(this).keyup(function(event) {
        var box = event.target;
        var txt = jQuery(this).val();
        var start = box.selectionStart;
        var end = box.selectionEnd;
        jQuery(this).val(txt.replace(/^(.)|(\s|\-)(.)/g, function($1) {
            return $1.toUpperCase();
        }));
        box.setSelectionRange(start, end);
    });

   return this;
	}
	jQuery(".fname, .lname").capitalize();
</script>
Viewing 1 reply thread

The support post ‘Default capitalize the first and last name field for questions’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso - Staging Server