Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
The bulk download file attachments function discussed in this article is achieved through the use of Custom HTML form element and Javascript codes. It will download all file attachment of the File Upload form element at a click of a button.
Be aware that this only serves as a temporary solution.
Drag a custom HTML into the designated form
Paste the following code. This will add a download all button to the form to perform bulk download files.
<div id="download-all" class="btn btn-primary">Download All</div> <script> $(function(){ searchParams = new URLSearchParams(window.location.search) // to check the mode mode = searchParams.get("_mode"); if(mode == 'add'){// hide if its "add" mode $('#download-all').hide(); } $('#download-all').on('click', function(){ links = $("ul.form-fileupload-value").find("a:not(.remove)"); // get all <a> tag except those with "remove" class $.each(links, function(k,v){ // iterate through them 1 by 1, while using click() on them. v.click(); }) }) }); </script>
Test the plugin at runtime
Check Results