Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: ArturoRobles

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#790399
Hello All,

I am using a dynaform with a Multiple File Uploader control in the "parent" Display Mode.
I would like to allow the users to add new files but prevent them from deleting files added in the previous steps.
Is it possible to disable a Delete button (an icon with a recycle bin) related to this control?
Please help.
#790410
Hello,

To achieve the requirement, you can do the following:
1. Create a Dynaform for the first step which has the Multiple File Upload web control and let it work as it does.
2. Create another Dynaform which will include the Multiple File Uploader(same ID as the first Dynaforms's MFU) from the first Dynaform.
3. Include the following javascript in the second Dynaform:
Code: Select all
$(document).ready(function(){
$("div.multiplefile-button-delete").remove();
});
This will remove the delete button in the second Dynaform for the files that have uploaded in the first step but retain the delete button for the files that will be uploaded in the current step.
You can refer the attached image for the output.
MFU-delete.png
MFU-delete.png (18.41 KiB) Viewed 3038 times
Hope this helps

Best Regards
Mishika
#828413
mishika wrote: Thu Apr 20, 2017 4:13 am Hello,

To achieve the requirement, you can do the following:
1. Create a Dynaform for the first step which has the Multiple File Upload web control and let it work as it does.
2. Create another Dynaform which will include the Multiple File Uploader(same ID as the first Dynaforms's MFU) from the first Dynaform.
3. Include the following javascript in the second Dynaform:
Code: Select all
$(document).ready(function(){
$("div.multiplefile-button-delete").remove();
});
This will remove the delete button in the second Dynaform for the files that have uploaded in the first step but retain the delete button for the files that will be uploaded in the current step.
You can refer the attached image for the output.

MFU-delete.png

Hope this helps

Best Regards
Mishika
Hello
I have the same problem but these codes do not work my muf name is multipleFileVar002
In the said code, should I put this name ??

Found the solution here: https://www.pmusers.com/i[…]

Learn what's new in ProcessMaker 3.6! We are proud[…]

Hello, I have a case that appears both as comple[…]

Any way I'll be subscribing to your feed and I hop[…]