amosbatto wrote:You can set hidden fields in your DynaForm by creating a trigger like this that is fired before the DynaForm:
Code: Select all@@processId = @@PROCESS;
@@taskId = @@TASK;
Then create two hidden fields in your DynaForm which are associated with the "processId" and "taskId" variables. Then you can access those two fields in your DynaForm with this JavaScript:
Code: Select allvar processId = $("#processId").getValue();
var taskId = $("#taskId").getValue();
Thanks for the example! Would this also be a good way to use the processmaker API and loop through the Dynaforms/steps in a particular task for the table of contents or is there a simpler way to have the buttons go directly to another form in the same step without having to list the order out individually like so?
Code: Select all$("#Form1").find("button").click(function(){
$("Form1").saveForm();
//redirect to form 1
location="../cases/cases_Step?TYPE=DYNAFORM&UID=273740600590380904b7a98047114290&POSITION=3&ACTION=EDIT";
});
$("#Form2").find("button").click(function(){
$("form").saveForm();
//redirect to form 2
location="../cases/cases_Step?TYPE=DYNAFORM&UID=27507221559038e71e8f528016360431&POSITION=4&ACTION=EDIT";
});
$("#Form3").find("button").click(function(){
$("form").saveForm();
//redirect to form 3
location="../cases/cases_Step?TYPE=DYNAFORM&UID=2021067515903a0000f70e4045010102&POSITION=5&ACTION=EDIT";
});
I'm currently using buttons as the steps and this works well, but I would like to use a method as to where I won't have to manually edit it if the dynaform changes it's positioning in the steps.
Thanks for the help again, you've been great.