Gustavo Reyes Gustavo Reyes - 2 months ago 10x
jQuery Question

How can I change all input values to uppercase using Jquery?

I want to change all my form values to uppercase before the form is submitted.

So far I have this but it's not working.

$('#id-submit').click(function () {
var allInputs = $(":input");


Try like below,

$('input[type=text]').val (function () {
    return this.value.toUpperCase();

You should use input[type=text] instead of :input or input as I believe your intention are to operate on textbox only.