Browse Source

#301: Add example showing how to enable the submit button all the time

nghuuphuoc 11 years ago
parent
commit
530389218f
1 changed files with 3 additions and 0 deletions
  1. 3 0
      demo/event.html

+ 3 - 0
demo/event.html

@@ -309,6 +309,9 @@ $(document).ready(function() {
             var $form = $(e.target);
             var $form = $(e.target);
             // I don't want to add has-success class to valid field container
             // I don't want to add has-success class to valid field container
             $field.parents('.form-group').removeClass('has-success');
             $field.parents('.form-group').removeClass('has-success');
+
+            // I want to enable the submit button all the time
+            $form.data('bootstrapValidator').disableSubmitButtons(false);
         });
         });
 
 
     // Validate the form manually
     // Validate the form manually