title: Bootstrap form add field dynamically
body: <p>I have created a bootstrap form and I want to add fields on the fly before the submit button is pressed. For example, when a user clicks 1 child, another div should ask Child's name and age and if the user selected 2 kids, it should ask for both kids before the user reaches the submit button. Just like hotels.com and expedia.com ask for child age when booking:
  My code so far:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;Check&lt;/title&gt;
        &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
        &lt;link href="css/bootstrap.min.css" rel="stylesheet"&gt;
        &lt;link href="css/styles.css" rel="stylesheet"&gt;
    &lt;/head&gt;
  &lt;body&gt;
      &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/bootstrap.js"&gt;&lt;/script&gt;
       &lt;div class="container"&gt;
          &lt;div class="workarea"&gt;
            &lt;center&gt;Let us know your situation &lt;br&gt;&lt;br&gt;
            &lt;form class="form-inline"&gt;
            &lt;div class="form-group"&gt;
            &lt;label for="age"&gt;I am &lt;/label&gt;
            &lt;input type="number" name="age" min=0 max=99 class="form-control" placeholder="Age" /&gt; years old &lt;br&gt;
            &lt;select class="selectpicker form-control" required name="maritalStatus"&gt;
              &lt;option value="married"&gt;Married&lt;/option&gt;
              &lt;option value="single"&gt;Single&lt;/option&gt;
            &lt;/select&gt;
            &lt;label for="kids"&gt;with &lt;label&gt;
            &lt;input type="number" name="kids" min=0 max=5 class="form-control" placeholder="kids"/&gt;
  
          &lt;/center&gt;&lt;br&gt;
            &lt;center&gt;&lt;input type="submit" value="Get me started" class="btn btn-lg btn-info" name="firstpage"/&gt;&lt;/center&gt;
            &lt;/form&gt;
          &lt;/div&gt;
       &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>