Trigger File Dropper using Another Button

0
Hi, i have a case where in popup layout there is 2 TextInput from entity BatchDocument and File Dropper Widget.   Then below File Dropper has Submit button, i notice File Dropper only has 2 options. Between it automatically upload or trigger by button at each list of files.   Is it posibble to trigger file dropper upload from another button, in my case is Submit Button.  
asked
3 answers
0

Hi Ibnu,

yes it is possible via javascript , just give class submit-btn to your submit button and use this code in your html snippet with javascript enabled

setTimeout(function() { const x = document.querySelector('.submit-btn'); const y = document.querySelector('.filedropper__dropzone');

if (x && y) {  x.addEventListener('click', function() { y.click(); }); } }, 1000);

Let me know if you need further help.

Good luck!

answered
0

Hi Ibnu,

If i understood your question , do you want to save all the documents on click of submit button not via autosave?

answered
0

Hi Ibnu,

You must be using dataview in your page and inside that file dropper and submit button so you will get object of dataview as a parameter in submit microflow and by association of that you will get list of files uploaded, which you can process further and commit at the end.

Hope it helps!

answered