title: How to dynamically disable form submit button when using Bootstrap validation
body: <p>I have a form that is validated using Bootstrap Validator <a href="http://1000hz.github.io/bootstrap-validator/" rel="nofollow">http://1000hz.github.io/bootstrap-validator/</a>.</p>
  
  <p>You don't see the form at first (display: none). When you get to the step where you fill out the form, the Submit button is enabled, although the form is not valid. 
  However, if I display the form right away, the Submit button is disabled until the form is valid, as I want it to be. Does anyone have idea why is this happening and how to get it to work?</p>
  
  <pre><code>&lt;div id="step0"&gt;
    Some code here that is visible in the first step
    &lt;div class="row"&gt;
      &lt;button type="button" class="btn btn-primary" onclick="step1();"&gt;Go to step 1&lt;/button&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div id="step1" style="display: none;"&gt;
    &lt;form id="forma-klijenta" data-toggle="validator" method="post" action="test.php"&gt;
      &lt;div class="row"&gt;
        &lt;div class="col-md-8 col-sm-12 form-right"&gt;
          &lt;h3&gt; Lični podaci &lt;/h3&gt;
          &lt;div class="row"&gt;
            &lt;div class="col-xs-12 form-group col-sm-6"&gt;
              &lt;input autocomplete="off" class="form-control" id="ime" data-minlength="2" name="ime" placeholder="Ime" required type="text" value=""
              pattern="^[A-ZŠĐČĆŽa-zšđčćž]([-' ]?[A-ZŠĐČĆŽa-zšđčćž])+$"data-error="Ime je obavezno. Dozvoljeni specijalni karakteri su - i '." /&gt;
              &lt;div class="help-block with-errors"&gt;&lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
  
        &lt;/div&gt;
      &lt;/div&gt; 
      &lt;div class="row form-group"&gt;
        &lt;button type="submit" class="btn btn-primary"&gt;Submit&lt;/button&gt;
      &lt;/div&gt;     
  
    &lt;/form&gt;
  &lt;!--      Kraj forme za unos podataka --&gt;
  &lt;/div&gt;
  </code></pre>