Working on the jquery clone with the current code if I click add more button I am able to clone in the original one i can able to attach the file but if I try to attach any file in the cloned one it is not working.
I tried even replacing id with class but still it is not working
Here is the jquery code
var count=0;
$(document).on("click", ".attch_add_button", function () {
var $clone = $('.cloned-row4:eq(0)').clone(true,true);
//$(".custom-file-input").closest('form').trigger('reset');
//$(".custom-file-input").replaceWith('.check'.val('').clone(true));
//alert("Clone number" + clone);
$clone.find('[id]').each(function(){this.id+=''});
$clone.find('.btn_more').after("<input type='button' class='btn_right btn_less1' id='buttonless'/>")
$clone.attr('id', "added"+(++count));
//$clone.find('#custom-file-input').val('');
$clone.find('.preview').hide();
$clone.wrap('<form>');
$clone.closest('form').trigger('reset');
$clone.unwrap();
//$clone.find('input[type=file]').val('');
//$clone.find('.pn_field').val("");
$(this).parents('.medica_rpt').after($clone);
});
Here is the fiddle Link
Kindly suggest here