Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

disabling submit button until all fields have values

$(function () {
    $('#submits').attr('disabled', true);
    $('#initial_5').change(function () {
        if ($('#initial_1').val() != '' && $('#initial_2').val() != '' && $('#initial_3').val() != '' && $('#initial_4').val() != '' && $('#initial_5').val() != '') {
            $('#submits').attr('disabled', false);
        } else {
            $('#submits').attr('disabled', true);
        }
    });
 });
 
PREVIOUS NEXT
Tagged: #disabling #submit #button #fields #values
ADD COMMENT
Topic
Name
5+4 =