Ask questions about installing and configuring ProcessMaker 3
#816199
Hi,
I'm trying to set the checkgroup options to true by default for some of the options, but only when it was never set. I know there is an isset() for the checkbox object, but I can't seem to figure it out for the checkgroup.

if (isset(@=checkgroupVarRequestType[0]))
{
$("#checkgroupVarRequestType").setValue(["398681640593f19bb413ea6021707339"]);
}
if (isset(@=checkgroupVarRequestType[1]))
{
$("#checkgroupVarRequestType").setValue(["708038330593f19c5728225042748718"]);
}
#816208
isset() is a PHP function and setValue() is a ProcessMaker method for JavaScript. You can't use them in the same code.

If you are setting the marked options in a checkgroup in a trigger, then use this code:
Code: Select all
//assuming that "checkgroupVarRequestType" is a checkgroup:
@=checkgroupVarRequestType = array();

if (isset(@=checkgroupVarRequestType[0])) {
    @=checkgroupVarRequestType[] = "398681640593f19bb413ea6021707339";
}

if (isset(@=checkgroupVarRequestType[1])) {
   @=checkgroupVarRequestType[] = "708038330593f19c5728225042748718";
}
If you want to do this with JavaScript, then see:
https://www.pmusers.com/index.php/Checkgroups
#816305
I was able to solve this by using the properties directly and setting the default value there by putting the key and separating it with a vertical pipe without quotations.
Capture2.JPG
Capture2.JPG (48 KiB) Viewed 19747 times

Web3 development encompasses creating decentralize[…]

The Upland Clone Script, offered by Dappsfirm, rep[…]

Dappsfirm offers a bet365 clone script that mirror[…]

🚀 Tauchen Sie mit Immediate Alora AI in die Welt d[…]