Dynamic form inputs with jquery

Dynamic form inputs with jquery

Hi, i need to do simple dynamic forms input for files uploading
  1. $('.add_field_button').click(function(e){  
        $('.input_fields_wrap').append('<input type="file" class="form" name="fileField" />');      
    });
i just tested simple this script is working everyting fine with a default html files input, but my html template using two inputs for file uploading one input for show what you selected and one to show attach button
  1. <div class="input_fields_wrap">   
  2.     <input type="text" class="form" name="textfield" /> this showing only selected file
        <input type="file" class="form" name="fileField" /> this showing only select button
  3. </div>
and when need to apppend all this two inputs
  1. $('.input_fields_wrap').append('<input type="text" class="form" name="textfield" /><input type="file" class="form" name="fileField" />');
i append like this, is looking good, but when i'm browse file ant try to select he not selecting for appended forms just showing blank text input.