Hi Everyone
When experimenting with functions that generate lists for enums and multienums
I noticed that there is no ListView view
When going to a list view and printing out the view param in the function I made I get returned
SearchForm_basic_search
SearchForm_advanced_search
MassUpdate
is there a tutorial somewhere which will show how suitecrm expects me to handle ListView for the fieldtype?
I’ve managed to get an unordered list to display on DetailView and for the selected items to properly show in EditView
For those not so inclined…
function signature for a enum/multienum options function
function handleMyField($bean, $fieldName, $selected, $view)
my function which a function like above calls to make a list
function arrayToUnorderedListHTML($list, $selected) {
global $app_list_strings;
$moduleLabelList = $app_list_strings['moduleList'];
$selected = unencodeMultienum($selected);
$html = "<ul>";
$html .= join(
"",
array_map(function($item) use($selected, $moduleLabelList) {
return in_array($item, $selected)
? "<li>{$moduleLabelList[$item]}</li>"
: "";
}, $list)
);
$html .= "</ul>";
return $html;
}