The problem is that you need to pass the "MultiSelect" parameter in the form definition for open_popup. Look at this example below for selecting multiple Contacts from the Accounts page.
PHP Code:
<form action="index.php">
<input type="button" name="select_button" id="select_button" class="button"
title="Select [Alt+T]" accesskey="T" value="Select"
onclick='open_popup("Contacts",600,400,"",true,true,{"call_back_function":"set_return_and_save_background","form_name":"DetailView","field_to_name_array":{"id":"subpanel_id"},"passthru_data":{"child_field":"Contacts","return_url":"index.php%3Fmodule%3DAccounts%26action%3DSubPanelViewer%26subpanel%3DContacts%26record%3D18f9ac99-e1db-926d-9312-47ba35a31008%26sugar_body_only%3D1","link_field_name":"contacts","module_name":"Contacts","refresh_page":"0"}},"MultiSelect",true);' /></form>
You should be able to set this as part of your sub-panel definition as shown below. You have to pass the "mode" parameter as part of the widget data.
$subpanel_layout = array(
'top_buttons' => array(
array('widget_class' => 'SubPanelTopCreateButton'),
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Contacts', 'mode'=>'MultiSelect'),
),
Bookmarks