本文整理汇总了PHP中CRM_Core_Form::get方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_Form::get方法的具体用法?PHP CRM_Core_Form::get怎么用?PHP CRM_Core_Form::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_Form
的用法示例。
在下文中一共展示了CRM_Core_Form::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Paytrail_civicrm_buildForm
/**
* Implements CiviCRM 'buildForm' hook.
*
* @param string $formName Name of current form.
* @param CRM_Core_Form $form Current form.
*/
function Paytrail_civicrm_buildForm($formName, &$form)
{
//Confirm Contribution
if ($form instanceof CRM_Contribute_Form_Contribution_Confirm) {
$paymentHelper = new PaytrailPaymentHelper();
if (!$paymentHelper->isEmbeddedButtonsEnabled()) {
return;
}
//Get form params to get customer contact info and product info
$component = "contribute";
$params = $form->get("params");
$params['item_name'] = $form->_values['title'];
$paymentHelper->embeddPaymentButtons($params, $component);
} else {
if ($form instanceof CRM_Event_Form_Registration_Confirm) {
$paymentHelper = new PaytrailPaymentHelper();
if (!$paymentHelper->isEmbeddedButtonsEnabled()) {
return;
}
//Get form params to get customer contact info and product info
$component = "event";
$formParamsArray = $form->get("params");
$params = $formParamsArray[0];
$params['item_name'] = $form->_values['event']['title'];
$paymentHelper->embeddPaymentButtons($params, $component);
}
}
}
示例2: buildQuickForm
/**
* build the form elements for a phone object
*
* @param CRM_Core_Form $form reference to the form object
* @param int $addressBlockCount block number to build
* @param boolean $blockEdit is it block edit
*
* @return void
* @access public
* @static
*/
static function buildQuickForm(&$form, $addressBlockCount = NULL, $blockEdit = FALSE)
{
// passing this via the session is AWFUL. we need to fix this
if (!$addressBlockCount) {
$blockId = $form->get('Phone_Block_Count') ? $form->get('Phone_Block_Count') : 1;
} else {
$blockId = $addressBlockCount;
}
$form->applyFilter('__ALL__', 'trim');
//phone type select
$form->addElement('select', "phone[{$blockId}][phone_type_id]", ts('Phone'), CRM_Core_PseudoConstant::get('CRM_Core_DAO_Phone', 'phone_type_id'));
//main phone number with crm_phone class
$form->addElement('text', "phone[{$blockId}][phone]", ts('Phone'), array_merge(CRM_Core_DAO::getAttribute('CRM_Core_DAO_Phone', 'phone'), array('class' => 'crm_phone twelve')));
// phone extension
$form->addElement('text', "phone[{$blockId}][phone_ext]", ts('Extension'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Phone', 'phone_ext'));
if (isset($form->_contactType) || $blockEdit) {
//Block type select
$form->addElement('select', "phone[{$blockId}][location_type_id]", '', CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id'));
//is_Primary radio
$js = array('id' => 'Phone_' . $blockId . '_IsPrimary', 'onClick' => 'singleSelect( this.id );');
$form->addElement('radio', "phone[{$blockId}][is_primary]", '', '', '1', $js);
}
// TODO: set this up as a group, we need a valid phone_type_id if we have a phone number
// $form->addRule( "location[$locationId][phone][$locationId][phone]", ts('Phone number is not valid.'), 'phone' );
}
示例3: buildQuickForm
/**
* build the form elements for an email object
*
* @param CRM_Core_Form $form reference to the form object
* @param array $location the location object to store all the form elements in
* @param int $locationId the locationId we are dealing with
* @param int $count the number of blocks to create
*
* @return void
* @access public
* @static
*/
static function buildQuickForm(&$form, $addressBlockCount = null)
{
// passing this via the session is AWFUL. we need to fix this
if (!$addressBlockCount) {
$blockId = $form->get('Email_Block_Count') ? $form->get('Email_Block_Count') : 1;
} else {
$blockId = $addressBlockCount;
}
$form->applyFilter('__ALL__', 'trim');
//Email box
$form->addElement('text', "email[{$blockId}][email]", ts('Email'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Email', 'email'));
$form->addRule("email[{$blockId}][email]", ts('Email is not valid.'), 'email');
if (isset($form->_contactType)) {
//Block type
$form->addElement('select', "email[{$blockId}][location_type_id]", '', CRM_Core_PseudoConstant::locationType());
//On-hold checkbox
$form->addElement('advcheckbox', "email[{$blockId}][on_hold]", null);
//Bulkmail checkbox
$js = array('id' => "Email_" . $blockId . "_IsBulkmail", 'onClick' => 'singleSelect( this.id );');
$form->addElement('advcheckbox', "email[{$blockId}][is_bulkmail]", null, '', $js);
//is_Primary radio
$js = array('id' => "Email_" . $blockId . "_IsPrimary", 'onClick' => 'singleSelect( this.id );');
$form->addElement('radio', "email[{$blockId}][is_primary]", '', '', '1', $js);
if (CRM_Utils_System::getClassName($form) == 'CRM_Contact_Form_Contact') {
$form->add('textarea', "email[{$blockId}][signature_text]", ts('Signature (Text)'), array('rows' => 2, 'cols' => 40));
$form->addWysiwyg("email[{$blockId}][signature_html]", ts('Signature (HTML)'), array('rows' => 2, 'cols' => 40));
}
}
}
示例4: buildQuickForm
/**
* build the form elements for an Website object
*
* @param CRM_Core_Form $form reference to the form object
* @param array $location the location object to store all the form elements in
* @param int $locationId the locationId we are dealing with
* @param int $count the number of blocks to create
*
* @return void
* @access public
* @static
*/
static function buildQuickForm(&$form)
{
$blockId = $form->get('Website_Block_Count') ? $form->get('Website_Block_Count') : 1;
$form->applyFilter('__ALL__', 'trim');
//Website type select
$form->addElement('select', "website[{$blockId}][website_type_id]", '', CRM_Core_PseudoConstant::websiteType());
//Website box
$form->addElement('text', "website[{$blockId}][url]", ts('Website'), array_merge(CRM_Core_DAO::getAttribute('CRM_Core_DAO_Website', 'url'), array('onfocus' => "if (!this.value) this.value='http://'; else return false", 'onblur' => "if ( this.value == 'http://') this.value=''; else return false")));
$form->addRule("website[{$blockId}][url]", ts('Enter a valid web location beginning with \'http://\' or \'https://\'. EXAMPLE: http://www.mysite.org/'), 'url');
}
示例5: buildQuickForm
/**
* build the form elements for an Website object
*
* @param CRM_Core_Form $form reference to the form object
* @param int $blockCount block number to build
*
* @return void
* @access public
* @static
*/
static function buildQuickForm(&$form, $blockCount = NULL)
{
if (!$blockCount) {
$blockId = $form->get('Website_Block_Count') ? $form->get('Website_Block_Count') : 1;
} else {
$blockId = $blockCount;
}
$form->applyFilter('__ALL__', 'trim');
//Website type select
$form->addSelect("website[{$blockId}][website_type_id]", array('entity' => 'website', 'class' => 'eight'));
//Website box
$form->addElement('text', "website[{$blockId}][url]", ts('Website'), array_merge(CRM_Core_DAO::getAttribute('CRM_Core_DAO_Website', 'url'), array('onfocus' => "if (!this.value) { this.value='http://';} else return false", 'onblur' => "if ( this.value == 'http://') { this.value='';} else return false")));
$form->addRule("website[{$blockId}][url]", ts('Enter a valid web location beginning with \'http://\' or \'https://\'. EXAMPLE: http://www.mysite.org/'), 'url');
}
示例6: buildQuickForm
/**
* Build the form object elements for an Website object.
*
* @param CRM_Core_Form $form
* Reference to the form object.
* @param int $blockCount
* Block number to build.
*/
public static function buildQuickForm(&$form, $blockCount = NULL)
{
if (!$blockCount) {
$blockId = $form->get('Website_Block_Count') ? $form->get('Website_Block_Count') : 1;
} else {
$blockId = $blockCount;
}
$form->applyFilter('__ALL__', 'trim');
//Website type select
$form->addField("website[{$blockId}][website_type_id]", array('entity' => 'website', 'class' => 'eight'));
//Website box
$form->addField("website[{$blockId}][url]", array('entity' => 'website'));
$form->addRule("website[{$blockId}][url]", ts('Enter a valid web address beginning with \'http://\' or \'https://\'.'), 'url');
}
示例7: buildQuickForm
/**
* build the form elements for an IM object
*
* @param CRM_Core_Form $form reference to the form object
* @param array $location the location object to store all the form elements in
* @param int $locationId the locationId we are dealing with
* @param int $count the number of blocks to create
*
* @return void
* @access public
* @static
*/
static function buildQuickForm(&$form)
{
$blockId = $form->get('IM_Block_Count') ? $form->get('IM_Block_Count') : 1;
$form->applyFilter('__ALL__', 'trim');
//IM provider select
$form->addElement('select', "im[{$blockId}][provider_id]", '', CRM_Core_PseudoConstant::IMProvider());
//Block type select
$form->addElement('select', "im[{$blockId}][location_type_id]", '', CRM_Core_PseudoConstant::locationType());
//IM box
$form->addElement('text', "im[{$blockId}][name]", ts('Instant Messenger'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_IM', 'name'));
//is_Primary radio
$js = array('id' => "IM_" . $blockId . "_IsPrimary", 'onClick' => 'singleSelect( this.id );');
$form->addElement('radio', "im[{$blockId}][is_primary]", '', '', '1', $js);
}
示例8: buildQuickForm
/**
* Build the form object elements for an email object.
*
* @param CRM_Core_Form $form
* Reference to the form object.
* @param int $blockCount
* Block number to build.
* @param bool $blockEdit
* Is it block edit.
*/
public static function buildQuickForm(&$form, $blockCount = NULL, $blockEdit = FALSE)
{
// passing this via the session is AWFUL. we need to fix this
if (!$blockCount) {
$blockId = $form->get('Email_Block_Count') ? $form->get('Email_Block_Count') : 1;
} else {
$blockId = $blockCount;
}
$form->applyFilter('__ALL__', 'trim');
//Email box
$form->addField("email[{$blockId}][email]", array('entity' => 'email'));
$form->addRule("email[{$blockId}][email]", ts('Email is not valid.'), 'email');
if (isset($form->_contactType) || $blockEdit) {
//Block type
$form->addField("email[{$blockId}][location_type_id]", array('entity' => 'email', 'placeholder' => NULL, 'class' => 'eight'));
//TODO: Refactor on_hold field to select.
$multipleBulk = CRM_Core_BAO_Email::isMultipleBulkMail();
//On-hold select
if ($multipleBulk) {
$holdOptions = array(0 => ts('- select -'), 1 => ts('On Hold Bounce'), 2 => ts('On Hold Opt Out'));
$form->addElement('select', "email[{$blockId}][on_hold]", '', $holdOptions);
} else {
$form->addField("email[{$blockId}][on_hold]", array('entity' => 'email', 'type' => 'advcheckbox'));
}
//Bulkmail checkbox
$form->assign('multipleBulk', $multipleBulk);
if ($multipleBulk) {
$js = array('id' => "Email_" . $blockId . "_IsBulkmail");
$form->addElement('advcheckbox', "email[{$blockId}][is_bulkmail]", NULL, '', $js);
} else {
$js = array('id' => "Email_" . $blockId . "_IsBulkmail");
if (!$blockEdit) {
$js['onClick'] = 'singleSelect( this.id );';
}
$form->addElement('radio', "email[{$blockId}][is_bulkmail]", '', '', '1', $js);
}
//is_Primary radio
$js = array('id' => "Email_" . $blockId . "_IsPrimary");
if (!$blockEdit) {
$js['onClick'] = 'singleSelect( this.id );';
}
$form->addElement('radio', "email[{$blockId}][is_primary]", '', '', '1', $js);
if (CRM_Utils_System::getClassName($form) == 'CRM_Contact_Form_Contact') {
$form->add('textarea', "email[{$blockId}][signature_text]", ts('Signature (Text)'), array('rows' => 2, 'cols' => 40));
$form->add('wysiwyg', "email[{$blockId}][signature_html]", ts('Signature (HTML)'), array('rows' => 2, 'cols' => 40));
}
}
}
示例9: process
/**
* @param CRM_Core_Form $form
*
* @return array
*/
public static function process(&$form)
{
if ($form->getVar('_surveyId') <= 0) {
return NULL;
}
$tabs = array('main' => array('title' => ts('Main Information'), 'link' => NULL, 'valid' => FALSE, 'active' => FALSE, 'current' => FALSE), 'questions' => array('title' => ts('Questions'), 'link' => NULL, 'valid' => FALSE, 'active' => FALSE, 'current' => FALSE), 'results' => array('title' => ts('Results'), 'link' => NULL, 'valid' => FALSE, 'active' => FALSE, 'current' => FALSE));
$surveyID = $form->getVar('_surveyId');
$class = $form->getVar('_name');
$class = CRM_Utils_String::getClassName($class);
$class = strtolower($class);
if (array_key_exists($class, $tabs)) {
$tabs[$class]['current'] = TRUE;
$qfKey = $form->get('qfKey');
if ($qfKey) {
$tabs[$class]['qfKey'] = "&qfKey={$qfKey}";
}
}
if ($surveyID) {
$reset = !empty($_GET['reset']) ? 'reset=1&' : '';
foreach ($tabs as $key => $value) {
if (!isset($tabs[$key]['qfKey'])) {
$tabs[$key]['qfKey'] = NULL;
}
$tabs[$key]['link'] = CRM_Utils_System::url("civicrm/survey/configure/{$key}", "{$reset}action=update&id={$surveyID}{$tabs[$key]['qfKey']}");
$tabs[$key]['active'] = $tabs[$key]['valid'] = TRUE;
}
}
return $tabs;
}
示例10: buildQuickForm
/**
* build the form elements for an open id object
*
* @param CRM_Core_Form $form reference to the form object
* @param array $location the location object to store all the form elements in
* @param int $locationId the locationId we are dealing with
* @param int $count the number of blocks to create
*
* @return void
* @access public
* @static
*/
static function buildQuickForm(&$form)
{
$blockId = $form->get('OpenID_Block_Count') ? $form->get('OpenID_Block_Count') : 1;
$form->applyFilter('__ALL__', 'trim');
$form->addElement('text', "openid[{$blockId}][openid]", ts('OpenID'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_OpenID', 'openid'));
$form->addRule("openid[{$blockId}][openid]", ts('OpenID is not a valid URL.'), 'url');
//Block type
$form->addElement('select', "openid[{$blockId}][location_type_id]", '', CRM_Core_PseudoConstant::locationType());
$config = CRM_Core_Config::singleton();
if ($config->userFramework == 'Standalone') {
$js = array('id' => "OpenID_" . $blockId . "_IsLogin", 'onClick' => 'singleSelect( this.id );');
$form->addElement('advcheckbox', "openid[{$blockId}][allowed_to_login]", null, '', $js);
}
//is_Primary radio
$js = array('id' => "OpenID_" . $blockId . "_IsPrimary", 'onClick' => 'singleSelect( this.id );');
$form->addElement('radio', "openid[{$blockId}][is_primary]", '', '', '1', $js);
}
示例11: preProcessCommon
/**
* @param CRM_Core_Form $form
* @param bool $useTable
*/
public static function preProcessCommon(&$form, $useTable = FALSE)
{
$values = $form->controller->exportValues($form->get('searchFormName'));
$form->_task = CRM_Utils_Array::value('task', $values);
$mailingTasks = CRM_Mailing_Task::tasks();
$form->assign('taskName', CRM_Utils_Array::value('task', $values));
// ids are mailing event queue ids
$ids = array();
if ($values['radio_ts'] == 'ts_sel') {
foreach ($values as $name => $value) {
if (substr($name, 0, CRM_Core_Form::CB_PREFIX_LEN) == CRM_Core_Form::CB_PREFIX) {
$ids[] = substr($name, CRM_Core_Form::CB_PREFIX_LEN);
}
}
} else {
$queryParams = $form->get('queryParams');
$sortOrder = NULL;
if ($form->get(CRM_Utils_Sort::SORT_ORDER)) {
$sortOrder = $form->get(CRM_Utils_Sort::SORT_ORDER);
}
$query = new CRM_Contact_BAO_Query($queryParams, NULL, NULL, FALSE, FALSE, CRM_Contact_BAO_Query::MODE_MAILING);
$result = $query->searchQuery(0, 0, $sortOrder);
while ($result->fetch()) {
$ids[] = $result->mailing_recipients_id;
}
$form->assign('totalSelectedMailingRecipients', $form->get('rowCount'));
}
if (!empty($ids)) {
$form->_componentClause = ' civicrm_mailing_recipients.id IN ( ' . implode(',', $ids) . ' ) ';
}
// set the context for redirection for any task actions
$session = CRM_Core_Session::singleton();
$fragment = 'search';
if ($form->_action == CRM_Core_Action::ADVANCED) {
$fragment .= '/advanced';
}
$qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $form);
$urlParams = 'force=1';
if (CRM_Utils_Rule::qfKey($qfKey)) {
$urlParams .= "&qfKey={$qfKey}";
}
$url = CRM_Utils_System::url('civicrm/contact/' . $fragment, $urlParams);
$session = CRM_Core_Session::singleton();
$session->replaceUserContext($url);
}
示例12: buildQuickForm
/**
* build the form elements for a phone object
*
* @param CRM_Core_Form $form reference to the form object
* @param array $location the location object to store all the form elements in
* @param int $locationId the locationId we are dealing with
* @param int $count the number of blocks to create
*
* @return void
* @access public
* @static
*/
static function buildQuickForm(&$form)
{
$blockId = $form->get('Phone_Block_Count') ? $form->get('Phone_Block_Count') : 1;
$form->applyFilter('__ALL__', 'trim');
//phone type select
$form->addElement('select', "phone[{$blockId}][phone_type_id]", ts('Phone'), CRM_Core_PseudoConstant::phoneType());
//phone box
$form->addElement('text', "phone[{$blockId}][phone]", ts('Phone'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Phone', 'phone'));
if (isset($form->_contactType)) {
//Block type select
$form->addElement('select', "phone[{$blockId}][location_type_id]", '', CRM_Core_PseudoConstant::locationType());
//is_Primary radio
$js = array('id' => "Phone_" . $blockId . "_IsPrimary", 'onClick' => 'singleSelect( this.id );');
$form->addElement('radio', "phone[{$blockId}][is_primary]", '', '', '1', $js);
}
// TODO: set this up as a group, we need a valid phone_type_id if we have a phone number
// $form->addRule( "location[$locationId][phone][$locationId][phone]", ts('Phone number is not valid.'), 'phone' );
}
示例13: preProcessCommon
/**
* Common pre-process function.
*
* @param CRM_Core_Form $form
* @param bool $useTable
*/
public static function preProcessCommon(&$form, $useTable = FALSE)
{
$form->_activityHolderIds = array();
$values = $form->controller->exportValues($form->get('searchFormName'));
$form->_task = $values['task'];
$activityTasks = CRM_Activity_Task::tasks();
$form->assign('taskName', $activityTasks[$form->_task]);
$ids = array();
if ($values['radio_ts'] == 'ts_sel') {
foreach ($values as $name => $value) {
if (substr($name, 0, CRM_Core_Form::CB_PREFIX_LEN) == CRM_Core_Form::CB_PREFIX) {
$ids[] = substr($name, CRM_Core_Form::CB_PREFIX_LEN);
}
}
} else {
$queryParams = $form->get('queryParams');
$query = new CRM_Contact_BAO_Query($queryParams, NULL, NULL, FALSE, FALSE, CRM_Contact_BAO_Query::MODE_ACTIVITY);
$query->_distinctComponentClause = '( civicrm_activity.id )';
$query->_groupByComponentClause = " GROUP BY civicrm_activity.id ";
// CRM-12675
$activityClause = NULL;
$components = CRM_Core_Component::getNames();
$componentClause = array();
foreach ($components as $componentID => $componentName) {
if (!CRM_Core_Permission::check("access {$componentName}")) {
$componentClause[] = " (activity_type.component_id IS NULL OR activity_type.component_id <> {$componentID}) ";
}
}
if (!empty($componentClause)) {
$activityClause = implode(' AND ', $componentClause);
}
$result = $query->searchQuery(0, 0, NULL, FALSE, FALSE, FALSE, FALSE, FALSE, $activityClause);
while ($result->fetch()) {
if (!empty($result->activity_id)) {
$ids[] = $result->activity_id;
}
}
}
if (!empty($ids)) {
$form->_componentClause = ' civicrm_activity.id IN ( ' . implode(',', $ids) . ' ) ';
$form->assign('totalSelectedActivities', count($ids));
}
$form->_activityHolderIds = $form->_componentIds = $ids;
// Set the context for redirection for any task actions.
$qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $form);
$urlParams = 'force=1';
if (CRM_Utils_Rule::qfKey($qfKey)) {
$urlParams .= "&qfKey={$qfKey}";
}
$session = CRM_Core_Session::singleton();
$searchFormName = strtolower($form->get('searchFormName'));
if ($searchFormName == 'search') {
$session->replaceUserContext(CRM_Utils_System::url('civicrm/activity/search', $urlParams));
} else {
$session->replaceUserContext(CRM_Utils_System::url("civicrm/contact/search/{$searchFormName}", $urlParams));
}
}
示例14: buildQuickForm
/**
* Build the form object elements for an open id object.
*
* @param CRM_Core_Form $form
* Reference to the form object.
* @param int $blockCount
* Block number to build.
* @param bool $blockEdit
* Is it block edit.
*/
public static function buildQuickForm(&$form, $blockCount = NULL, $blockEdit = FALSE)
{
if (!$blockCount) {
$blockId = $form->get('OpenID_Block_Count') ? $form->get('OpenID_Block_Count') : 1;
} else {
$blockId = $blockCount;
}
$form->applyFilter('__ALL__', 'trim');
$form->addElement('text', "openid[{$blockId}][openid]", ts('OpenID'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_OpenID', 'openid'));
$form->addRule("openid[{$blockId}][openid]", ts('OpenID is not a valid URL.'), 'url');
//Block type
$form->addElement('select', "openid[{$blockId}][location_type_id]", '', CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id'));
//is_Primary radio
$js = array('id' => "OpenID_" . $blockId . "_IsPrimary");
if (!$blockEdit) {
$js['onClick'] = 'singleSelect( this.id );';
}
$form->addElement('radio', "openid[{$blockId}][is_primary]", '', '', '1', $js);
}
示例15: buildQuickForm
/**
* build the form elements for an email object
*
* @param CRM_Core_Form $form reference to the form object
* @param array $location the location object to store all the form elements in
* @param int $locationId the locationId we are dealing with
* @param int $count the number of blocks to create
*
* @return void
* @access public
* @static
*/
static function buildQuickForm(&$form)
{
$blockId = $form->get('Email_Block_Count') ? $form->get('Email_Block_Count') : 1;
$form->applyFilter('__ALL__', 'trim');
//Email box
$form->addElement('text', "email[{$blockId}][email]", ts('Email'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Email', 'email'));
$form->addRule("email[{$blockId}][email]", ts('Email is not valid.'), 'email');
if (isset($form->_contactType)) {
//Block type
$form->addElement('select', "email[{$blockId}][location_type_id]", '', CRM_Core_PseudoConstant::locationType());
//On-hold checkbox
$form->addElement('advcheckbox', "email[{$blockId}][on_hold]", null);
//Bulkmail checkbox
$js = array('id' => "Email_" . $blockId . "_IsBulkmail", 'onClick' => 'singleSelect( this.id );');
$form->addElement('advcheckbox', "email[{$blockId}][is_bulkmail]", null, '', $js);
//is_Primary radio
$js = array('id' => "Email_" . $blockId . "_IsPrimary", 'onClick' => 'singleSelect( this.id );');
$form->addElement('radio', "email[{$blockId}][is_primary]", '', '', '1', $js);
}
}