Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
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.
#822926
Hello,

I have a Dynaform with multiple file control field at the submission of the form I use setOnSubmit() to check if there a file that has been uploaded, I am trying $("#id").getValue() to get the file name but it returns empty, $("#id").getText() gives me undefined value in the console.

I am using Processmaker 3.2.1 Enterprise edition.
I am using the recommendation in the wiki
https://wiki.processmaker.com/3.0/File_ ... pt_Methods
how I can fix this problem?
#822941
You should read the documentation on Multiple Files at pmusers.com:
https://www.pmusers.com/index.php/Multiple_Files

Your JavaScript code would be:
Code: Select all
$("#"+formId).setOnSubmit( function() {
   if ($("#myFiles").getInfo().fileCollection.length > 0) {
      var filename = $("#myFiles").getInfo().fileCollection.models[0].attributes.file.name
   }
});

Being the best in the started business is the obje[…]

Winzo is a popular and unique game on the mobile p[…]

Cannot create process using templets

Real details. The problem was solved by effect!

However, it is essential to use it responsibly and[…]