本文整理汇总了PHP中CRM_Core_Form::removeElement方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_Form::removeElement方法的具体用法?PHP CRM_Core_Form::removeElement怎么用?PHP CRM_Core_Form::removeElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_Form
的用法示例。
在下文中一共展示了CRM_Core_Form::removeElement方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildQuickForm
/**
* @param CRM_Core_Form $form
*/
public static function buildQuickForm(&$form)
{
$form->removeElement('status_id');
$form->removeElement('priority_id');
$caseId = CRM_Utils_Array::first($form->_caseId);
$currentStartDate = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_Case', $caseId, 'start_date');
$form->assign('current_start_date', $currentStartDate);
$form->addDate('start_date', ts('New Start Date'), FALSE, array('formatType' => 'activityDateTime'));
}
示例2: buildQuickForm
/**
* @param CRM_Core_Form $form
*/
public static function buildQuickForm(&$form)
{
$form->removeElement('status_id');
$form->removeElement('priority_id');
$caseId = CRM_Utils_Array::first($form->_caseId);
$form->_caseType = CRM_Case_PseudoConstant::caseType();
$form->_caseTypeId = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_Case', $caseId, 'case_type_id');
if (!in_array($form->_caseTypeId, $form->_caseType)) {
$form->_caseType[$form->_caseTypeId] = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_CaseType', $form->_caseTypeId, 'title');
}
$form->add('select', 'case_type_id', ts('New Case Type'), $form->_caseType, TRUE);
// timeline
$form->addYesNo('is_reset_timeline', ts('Reset Case Timeline?'), NULL, TRUE, array('onclick' => "return showHideByValue('is_reset_timeline','','resetTimeline','table-row','radio',false);"));
$form->addDateTime('reset_date_time', ts('Reset Start Date'), FALSE, array('formatType' => 'activityDateTime'));
}
示例3: buildQuickForm
/**
* @param CRM_Core_Form $form
*/
public static function buildQuickForm(&$form)
{
$form->removeElement('status_id');
$form->removeElement('priority_id');
$form->_caseStatus = CRM_Case_PseudoConstant::caseStatus();
foreach ($form->_caseId as $key => $val) {
$form->_oldCaseStatus[] = $form->_defaultCaseStatus[] = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_Case', $val, 'status_id');
}
foreach ($form->_defaultCaseStatus as $keydefault => $valdefault) {
if (!array_key_exists($valdefault, $form->_caseStatus)) {
$form->_caseStatus[$valdefault] = CRM_Core_OptionGroup::getLabel('case_status', $valdefault, FALSE);
}
}
$element = $form->add('select', 'case_status_id', ts('Case Status'), $form->_caseStatus, TRUE);
// check if the case status id passed in url is a valid one, set as default and freeze
if (CRM_Utils_Request::retrieve('case_status_id', 'Positive', $form)) {
$caseStatusId = CRM_Utils_Request::retrieve('case_status_id', 'Positive', $form);
$caseStatus = CRM_Case_PseudoConstant::caseStatus();
$form->_defaultCaseStatus = array_key_exists($caseStatusId, $caseStatus) ? $caseStatusId : NULL;
$element->freeze();
}
}