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.
#813012
I'm using PM 3.0. I want to keep the value in text field after clicking a button (NOT SUBMIT BUTTON) and refreshing the task. What should I do?

For example, I have a Dynaform for staff to fill customer's information. In this form, I have some text fields, a "complete" button and a submit button. After filling in some text fields, the staff clicks "COMPLETE" button then unintentional clicks "Draft" in the left column. The task moves to draft. I want the staff to continue the task without fill in text fields again (and without clicking submit button). I think the variables should be assigned with the value in text fields.
#813018
I'm not sure that I understand what you want.
If you want the values entered in the DynaForm to be saved, then you can use this JavaScript code to be executed when the user clicks on the "Complete" button:
Code: Select all
$("#completeButton").find("button").onclick( function() {
   var formId = $("form").prop("id");
   $( '#'+formId ).saveForm();
}); 
Where the ID of your button is "completeButton".
See: http://wiki.processmaker.com/3.1/JavaSc ... m.saveForm
#813021
amosbatto wrote:I'm not sure that I understand what you want.
If you want the values entered in the DynaForm to be saved, then you can use this JavaScript code to be executed when the user clicks on the "Complete" button:
Code: Select all
$("#completeButton").find("button").onclick( function() {
   var formId = $("form").prop("id");
   $( '#'+formId ).saveForm();
});
Where the ID of your button is "completeButton".
See: http://wiki.processmaker.com/3.1/JavaSc ... m.saveForm
thanks a lot :D but it seems not be used for file type :cry: what should I do?
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]