I have a field for entering a name. Is there javascript (or other means) of capitalising the first letters of the name?
Page 1 / 1
Hello @duncan_19 ,
Paste the below code to the js(onReady) of the Text entry question type
jQuery("#"+this.questionId+" .InputText").on('blur',function(){
jQuery(this).val(jQuery(this).val().replace(jQuery(this).val()[0],jQuery(this).val()[0].toUpperCase()));
});
Paste the below code to the js(onReady) of the Text entry question type
jQuery("#"+this.questionId+" .InputText").on('blur',function(){
jQuery(this).val(jQuery(this).val().replace(jQuery(this).val()[0],jQuery(this).val()[0].toUpperCase()));
});
Thanks Sashi - this works for the first name but not the last name. Can you extend the code to capitalise all first letters - that would be perfect.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.