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.