Skip to content

Commit

Permalink
Fix multiple type file fields in cloneable groups not cloning properly
Browse files Browse the repository at this point in the history
  • Loading branch information
rilwis committed Dec 15, 2022
1 parent 0bb17c5 commit 95127eb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/file.js
Expand Up @@ -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 );

Expand Down

0 comments on commit 95127eb

Please sign in to comment.