diff --git a/js/file.js b/js/file.js index 03b62df3..89fc29b1 100644 --- a/js/file.js +++ b/js/file.js @@ -106,7 +106,10 @@ inputName = '_file_' + rwmb.uniqid(); $list.empty(); - $clone.find( '.rwmb-file-input' ).attr( 'name', inputName + '[]' ).not( ':first' ).remove(); + + $clone.find( '.rwmb-file-new' ).each( function() { + $( this ).find( '.rwmb-file-input' ).attr( 'name', inputName + '[]' ).not( ':first' ).remove(); + } ); $key.val( inputName );