Skip to content

multiple file uploads appending results to wrong file upload after all file uploads are filled in frontend form #296

Closed
@shivgre

Description

@shivgre

There is a bug in the cmb.js file for file_list file input which after all file or file_lists have been selected and then if user reselect some more files in file_list or file inputs then the result is appended in wrong file input.
I found the fix.
It was the wrong selector object used. Please correct it for others.
In cmb2.js inside cmb.mediaHandlers.list function change the selector for appending the result from :

    $formfield.siblings('.cmb2-media-status').slideDown().append(this);

to :

    jQuery('#'+cmb.formfield).siblings('.cmb2-media-status').slideDown().append(this);

at line number 232.
Hope that helps the plugin developer and community, wasted 2 days to fix this bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions