Dynamic form inputs with jquery
Hi, i need to do simple dynamic forms input for files uploading
- $('.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
- <div class="input_fields_wrap">
- <input type="text" class="form" name="textfield" /> this showing only selected file
<input type="file" class="form" name="fileField" /> this showing only select button
- </div>
and when need to apppend all this two inputs
- $('.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.