• Resolved ec049

    (@ec049)


    Hello, I’m strarting to use the plugin, im using it and works fine.

    Im making a form with modals, first modal have the form with the plugin for upload the files, and the second modal to confirm the fields values as a summary to confim before send it.

    ¿How I can show the filenames at the second modal with JS?

    For contact form I am using function with that and its working well, but I don’t get how to do that with Drag and Drop Multifile Upload CF7 plugin:
    var name = $(‘.wpcf7 input[name=your-name]’).val();
    document.getElementById(‘modalIdname’).innerHTML = name;

    Thanks in advantage.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    Hello @ec049 ,

    Can you try this?

    var $fields = jQuery('input[name^="uploader-249"]');
    var $names = [];
    
    jQuery.each( $fields, function(i,v){
       var val = jQuery(v).val();
       $names[i] = val.replace(/.*\//, '');
    });
    
    // Log $names (you may append name above inside .each )
    console.log($names);

    Just change “uploader-249” to the correct name of your fields.

    I hope that will help.

    Thread Starter ec049

    (@ec049)

    Hello @glenwpcoder that’s worked for me, so much thanks!!!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Attachments file names’ is closed to new replies.