title: Jquery dynamically created inputs not posting
body: <p>I have a form that has inputs being created dynamically with Jquery. If I hardcode an element exactly like it is being created with Jquery, I get the POST data fine. But when the elements are created dynamically, they do not submit their POST data. </p>
  
  <p>The Jquery for creating the elements (using Jquery-UI to drag and drop an element, when it is dropped it creates a new element in that area).</p>
  
  <pre><code>$(".drop-container").droppable({
      accept: ".draggable",
      addClasses: false,
      drop: function (event, ui) {
          var drag_name = ui.draggable.html();
          ui.draggable.hide();
          var new_body_count = '&lt;tr&gt;&lt;td class="btn btn-primary"&gt;' + drag_name + '&lt;/td&gt;&lt;td class="badge"&gt;&lt;input placeholder="Number of Kills" name="body_count" class="number-count" type="number"&gt;&lt;/td&gt;&lt;/tr&gt;'
          $('.table').prepend(new_body_count)
      }
  });
  </code></pre>
  
  <p>The HTML that it creates - </p>
  
  <pre><code>&lt;tr&gt;
      &lt;td class="btn btn-primary"&gt;
          &lt;span class="glyphicon glyphicon-resize-vertical" aria-hidden="true"&gt;
              &lt;input type="hidden" name="actor_id[]" value="162705079"&gt;
          &lt;/span&gt;
          Julie Benz - J
      &lt;/td&gt;
      &lt;td class="badge"&gt;
          &lt;input placeholder="Number of Kills" name="body_count" class="number-count" type="number"&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>It is definitely inside of the form tag. Like I said, if I hardcode the html, it POSTS fine, but when the inputs are created by Jquery, no post. I am quite sure something to do with it being dynamically created.</p>
  
  <p>edit - </p>
  
  <pre><code>$('#update_form').on('submit', 'form', function(){
       $('.abridged-hide input').attr('disabled', true);
       $('.unabridged-hide input').attr('disabled', true);
  });
  </code></pre>
  
  <p>edit - the code for the HTML form </p>
  
  <pre><code>&lt;legend class="text-center"&gt;Film title: &lt;?=$film_title_text?&gt;&lt;/legend&gt;
  &lt;div class="col-md-3"&gt;
      &lt;?=form_open('update/add_category');?&gt;
          &lt;label for="category"&gt;Category Title&lt;/label&gt;
          &lt;?=form_input($cat_title, '');?&gt;
          &lt;button type="submit" class="btn btn-primary"&gt;Add Category&lt;/button&gt; 
      &lt;?=form_close();?&gt;
  &lt;/div&gt;
  &lt;div id="event_form" class="col-md-6"&gt;
      &lt;?=form_open('/update/save_entry', $update_id);?&gt;
      &lt;?php if(isset($thenav['nav_id'])){?&gt;
          &lt;input type="hidden" name="film_id" value="&lt;?=$q?&gt;"&gt;
          &lt;div class="form-group"&gt;
              &lt;label for="add_category"&gt;Add Category&lt;/label&gt;
              &lt;?=form_dropdown('cat_id', $cat, '', $cat_id );?&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
             &lt;label for="heading"&gt;Article Title&lt;/label&gt;
             &lt;?=form_input($title, '');?&gt;
          &lt;/div&gt;
          &lt;div class="well"&gt;
               &lt;div class="form-group"&gt;
                    &lt;label for="heading"&gt;Add Custom Body Count Field&lt;/label&gt;
                    &lt;input type="text" class="form-control" name="body_count"&gt;
                    &lt;button class="btn btn-primary" id="custom_body_cnt"&gt;Add Custom Body Count Field&lt;/button&gt;
               &lt;/div&gt;     
           &lt;/div&gt;
           &lt;div class="panel panel-primary"&gt;
               &lt;div class="panel-heading"&gt;Abridged Cast&lt;/div&gt;
           &lt;div class="panel-body abridged-hide"&gt;
      &lt;?php 
      foreach ($this_actors as $this_actor['name']) {
          $characters = $this_actor['name']-&gt;name;
          if(isset($characters[0])){
              $characters = $characters[0];
          }else{
              $characters = '';
          }
          echo "&lt;span class='btn btn-primary draggable'&gt;&lt;input type='hidden' class='actor_field' name='actor_id[]' value='".$this_actor['name']-&gt;id."'&gt;&lt;span class='glyphicon glyphicon-resize-vertical' aria-hidden='true'&gt;&lt;/span&gt; ".$this_actor['name']-&gt;name." - ".$characters."&lt;/span&gt;";
      }?&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;button id="slide-abridged" class="btn wide-button"&gt;&lt;span class='glyphicon glyphicon-resize-vertical' aria-hidden='true'&gt;&lt;/span&gt;&lt;/button&gt;
  
      &lt;div class="panel panel-primary"&gt;
      &lt;div class="panel-heading"&gt;Unabridged Cast&lt;/div&gt;
           &lt;button id="slide-unabridged" class="btn wide-button"&gt;&lt;span class='glyphicon glyphicon-resize-vertical' aria-hidden='true'&gt;&lt;/span&gt;&lt;/button&gt;
          &lt;div class="panel-body unabridged-hide"&gt;
      &lt;?php 
      foreach ($unabridged_actors as $this_actor['name']) {
          $characters = $this_actor['name']-&gt;characters;
          if(isset($characters[0])){
              $characters = $characters[0];
          }else{
              $characters = '';
          }
          echo "&lt;input type='text' name='actor_name' value='".$this_actor['name']-&gt;id."'&gt;";
          echo "&lt;span class='btn btn-primary draggable'&gt;&lt;span class='glyphicon glyphicon-resize-vertical' aria-hidden='true'&gt;&lt;/span&gt; ".$this_actor['name']-&gt;name." - ".$characters."&lt;/span&gt;";
      }?&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;button id="slide-unabridged" class="btn wide-button"&gt;&lt;span class='glyphicon glyphicon-resize-vertical' aria-hidden='true'&gt;&lt;/span&gt;&lt;/button&gt;
      &lt;?=form_textarea($article, '');?&gt;
      &lt;/div&gt;
      &lt;div class="col-md-3"&gt;
          &lt;span class="label label-default"&gt;Body Count Inventory&lt;/span&gt;
          &lt;div class="well drop-container clearfix"&gt;
              &lt;table class="table"&gt;               
                  &lt;tr&gt;
                      &lt;td class="btn btn-primary"&gt;Total&lt;/td&gt;
                      &lt;td class="badge"&gt;&lt;input placeholder="Number of Kills" name="film_total" class="film_total" disabled type="number"&gt;&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
          &lt;/div&gt;
         &lt;button type="submit" id="entry_submit" class="btn btn-primary"&gt;Update Page&lt;/button&gt;
  &lt;?php }?&gt;
  
  &lt;?=form_close()?&gt;
  &lt;/div&gt;
  </code></pre>