diff --git a/ktapi/KTAPIDocument.inc.php b/ktapi/KTAPIDocument.inc.php index 7266032..88756e2 100644 --- a/ktapi/KTAPIDocument.inc.php +++ b/ktapi/KTAPIDocument.inc.php @@ -1255,6 +1255,10 @@ class KTAPI_Document extends KTAPI_FolderItem // Options - Required for Custom Properties $options = array(); + if ($field->getInetLookupType() == 'multiwithcheckboxes' || $field->getInetLookupType() == 'multiwithlist') { + $controltype = 'multiselect'; + } + switch ($controltype) { case 'lookup': @@ -1270,6 +1274,12 @@ class KTAPI_Document extends KTAPI_FolderItem ); $selection= array(); break; + case 'multiselect': + $selection = KTAPI::get_metadata_lookup($field->getId()); + $options = array( + 'type' => $field->getInetLookupType() + ); + break; default: $selection= array(); } diff --git a/ktapi/ktapi.inc.php b/ktapi/ktapi.inc.php index e867883..ec3dbee 100644 --- a/ktapi/ktapi.inc.php +++ b/ktapi/ktapi.inc.php @@ -1036,8 +1036,13 @@ class KTAPI $controltype = 'tree'; } } - $options = array(); + + if ($field->getInetLookupType() == 'multiwithcheckboxes' || $field->getInetLookupType() == 'multiwithlist') { + $controltype = 'multiselect'; + } + + switch ($controltype) { case 'lookup': @@ -1053,6 +1058,12 @@ class KTAPI ); $selection= array(); break; + case 'multiselect': + $selection = KTAPI::get_metadata_lookup($field->getId()); + $options = array( + 'type' => $field->getInetLookupType() + ); + break; default: $selection= array(); } @@ -1065,7 +1076,7 @@ class KTAPI 'description' => $field->getDescription(), 'control_type' => $controltype, 'selection' => $selection, - 'options' => $options, + 'options' => $options ); } $result['fields'] = $fieldsresult;