Hi,
In subpanel 'Contacts' in ProspectLists I want to select some contacts with checkbox, click "Select List", and select a ProspectList from the popup to relate these contacts. I'm associating the contact ids to the checkboxes but don't know how to pass these ids to the popuped window.
modules/ProspectLists/metadata/subpanels/ForContacts.php:
include/generic/SugarWidgets/SugarWidgetSubPanelCheckBox.php:PHP Code:$subpanel_layout = array(
'top_buttons' => array(
array('widget_class' => 'SubPanelTopCreateButton'),
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Contacts'),
array('widget_class' => 'SubPanelTopAddToListButton'),
),
'where' => '',
'list_fields' => array(
'checkboxes'=>array(
'vname' => 'LBL_CHECKBOX',
'widget_class' => 'SubPanelCheckBox',
'sortable' => false,
),
// rest of the panel
SugarWidgetSubPanelTopAddToListButton.php is a copy of SugarWidgetSubPanelTopSelectContactsButton.php with different button value and popup module.PHP Code:<?php
require_once('include/generic/SugarWidgets/SugarWidgetField.php');
class SugarWidgetSubPanelCheckBox extends SugarWidgetField
{
function displayList(&$layout_def)
{
$contact_id = NULL;
if ($layout_def['fields'] && is_array($layout_def['fields'])) {
$contact_id = $layout_def['fields']['ID'];
}
$checkbox = "<INPUT type=\"checkbox\" name=\"contact_checkbox[]\" value=\"$contact_id\">";
return $checkbox;
}
}
?>
SugarCE 5.2.0e
Thanks


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks