My FormBuilder form saves to another LISE Instance (LISEEmployee) where the field is set to be a LISE Instance Item (LISEEquipment) with item_id as Identifier and Sub Type is set to Chekcbox Group.
In the backend in the Item overview, I can see the selected values correctly, but when I click on the individual item, nothing is selected in the checkbox group.
So how do I get the individual checkboxes to be selected in the LISE Instance when creating from FormBuilder?
I can see in the MySQL table that the checkbox group values are stored as comma separated values in a record e.g. 5, 8, but if I select the checkbox group directly in my LISE Instance, 5 and 8 are stored in the MySQL table as individual records.
I assume that it is my UDT saving from FormBuilder that is the problem?
The part of the UDT that is saving to LISE:
Code: Select all
$obj->title = $params['title'];
$obj->alias = $alias; # we already have one
$obj->url = $url_prefix . '/' . $params['recid'] . '-' . preg_replace('/-+/', '-', $title);
foreach($params as $key => $value) {
if(isset($obj->fielddefs[$key])){
if($value != "[unspecified]"){
$obj->$key = $value;
}
}
}
$mod->SaveItem($obj);