Questions and discussion about using ProcessMaker: user interface, running cases & functionality

Moderator: amosbatto

#826966
Dear All
I want to create a dynaform. But the dynaform should show different buttons depending on the days of a leave request. For example, if this is a 1-day leave request, it should show "approve" in the supervisor. However if this leave is 3 or more days, then it should show "Agree" in the "supervisor" and request then be sent to the manager and show "Approve" button. How can I do this? Should I write a trigger ?
#826993
Hi,

You can use two way javascript or trigger
For example with trigger you can do like this:
Code: Select all
//PHP CODE
@@hidden_js = '';
if(@@remain == 1){
	@@hidden_js .= '
		$("#button_1").hide();
	';
}
else if(@@remain == 2){
	@@hidden_js .= '
		$("#button_2").hide();
	';
}
else if(@@remain == 3){
	@@hidden_js .= '
		$("#button_3").hide();
	';
}
Now you must create a hidden field in your dynaform with "hidden_js" name and with the bellow javascript code:
Code: Select all
$("document").ready( function(){
	if($('#hidden_js').getValue() != '')
		eval($('#hidden_js').getValue());
});
https://www.youtube.com/channel/UCYiyz1 ... jMXodwH1iw
Thanks

Hi. Have you tried to use JavaScript on your Dyn[…]

Hi Please, could you send information about the c[…]

Dashboard issue

Can you show me what you were trying to do in orde[…]

I want to make the Jalali calendar in all of[…]