Page 1 of 1

Clear uploaded files in multiple file controller

Posted: Wed Feb 24, 2021 12:30 pm
by silviuA
Hi,
simple scenario : a dynaform with a few input controllers, a multiple file controller and a reset button. Pressing the reset button should reset the form by emptying the controls and the files uploaded in the multiple file controller.
Emptying the input controllers is not an issue, but I don't know where to start to implement removing the files uploaded in the multiple file controller.
Any idea?

Thanks,
Silviu

P.S. it looks i posted this thread in the wrong section. Can any moderators move it to Developing processes & programming.

Re: Clear uploaded files in multiple file controller

Posted: Wed Feb 24, 2021 2:45 pm
by silviuA
Found the solution here:
https://www.pmusers.com/index.php/Manipulating_Multiple_File_controls_with_JavaScript

3.2.1 and earlier:
Code: Select all
$("#MultipleFileID").find("div.multiplefile-button-delete").click()
3.2.2 and latter:
Code: Select all
$("#MultipleFileID").find("a.fa-trash").click()
More details in the link.