• Resolved jonielr

    (@jonielr)


    Hi, the plugin is not working on a modal pop-up. I am using convertplus plugin to generate the modal pop-up.

    Plugin functions and their styles wont work when the modal pop-up is enabled.

    Please advise. Thank you.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jonielr

    (@jonielr)

    Just in case someone has the same issue, I was able to resolve it by changing the jQuery script in the file “zl-multine-files.js” below are the changes I made:

    NOTE: I have a div with a class “modal-form-footer” for the modal pop-up.

    FROM:

    $('#mfcf7_zl_add_file').on('click tap', function() {
            var zl_filecontainer = '#mfcf7_zl_multifilecontainer';



    TO:

    $('body').on('click tap', '#mfcf7_zl_add_file, .modal-form-footer #mfcf7_zl_add_file', function() {
        var zl_filecontainer;
        
        // If we're inside a modal
        if($(this).closest('.modal-form-footer').length > 0) {
            zl_filecontainer = $(this).closest('.modal-form-footer').find('#mfcf7_zl_multifilecontainer');
        } 
        // If we're not inside a modal
        else {
            zl_filecontainer = $('#mfcf7_zl_multifilecontainer');
        }


    In this revised version, the script checks if #mfcf7_zl_add_file is within a .modal-form-footer. If it is, it selects the #mfcf7_zl_multifilecontainer within that modal. If it’s not, it selects the #mfcf7_zl_multifilecontainer in the main document. This should ensure the correct #mfcf7_zl_multifilecontainer is selected whether you’re inside or outside a modal.

    • This reply was modified 1 year, 5 months ago by jonielr.
    Plugin Author Divyesh_kakrecha

    (@divyeshk71)

    Thank you for your solutions. We will likely implement them in our next release.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multiple Files not functioning on modal pop-up’ is closed to new replies.