当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Form_Element_Hidden::setIsArray方法代码示例

本文整理汇总了PHP中Zend_Form_Element_Hidden::setIsArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Hidden::setIsArray方法的具体用法?PHP Zend_Form_Element_Hidden::setIsArray怎么用?PHP Zend_Form_Element_Hidden::setIsArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Form_Element_Hidden的用法示例。


在下文中一共展示了Zend_Form_Element_Hidden::setIsArray方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'frm_multiple_resume');
     $this->setAttrib('name', 'frm_multiple_resume');
     $this->setAttrib('action', BASE_URL . 'candidatedetails/multipleresume');
     $id = new Zend_Form_Element_Hidden('id');
     $id_val = Zend_Controller_Front::getInstance()->getRequest()->getParam('id', null);
     $requisition_id = new Zend_Form_Element_Select("requisition_id");
     $requisition_id->setRegisterInArrayValidator(false);
     $requisition_id->setLabel("Requisition ID");
     $requisition_id->setAttrib("class", "formDataElement");
     $requisition_id->setAttrib('onchange', 'displayParticularCandidates(this,"cand")');
     $requisition_id->setAttrib('title', 'Requisition ID');
     if ($id_val == '') {
         $requisition_id->setRequired(true);
         $requisition_id->addValidator('NotEmpty', false, array('messages' => 'Please select requisition id.'));
     }
     $candidate_firstname = new Zend_Form_Element_Text('candidate_firstname');
     $candidate_firstname->setIsArray(TRUE);
     $candidate_firstname->setAttrib('maxLength', 90);
     $candidate_firstname->setAttrib('title', 'Candidate First Name');
     $candidate_firstname->setAttrib('class', 'candidate_firstname');
     $candidate_firstname->addFilter(new Zend_Filter_StringTrim());
     $candidate_firstname->setRequired(true);
     $candidate_firstname->addValidator("regex", true, array('pattern' => '/^[a-zA-Z.\\- ?]+$/', 'messages' => array('regexNotMatch' => 'Please enter valid candidate first name.')));
     $candidate_lastname = new Zend_Form_Element_Text('candidate_lastname');
     $candidate_lastname->setIsArray(TRUE);
     $candidate_lastname->setAttrib('maxLength', 90);
     $candidate_lastname->setAttrib('title', 'Candidate Last Name');
     $candidate_lastname->setAttrib('class', 'candidate_lastname');
     $candidate_lastname->addFilter(new Zend_Filter_StringTrim());
     $candidate_lastname->setRequired(true);
     $candidate_lastname->addValidator("regex", true, array('pattern' => '/^[a-zA-Z.\\- ?]+$/', 'messages' => array('regexNotMatch' => 'Please enter valid candidate last name.')));
     $candidate_resumes = new Zend_Form_Element_Hidden('cand_resume');
     $candidate_resumes->setIsArray(TRUE);
     $candidate_resumes->setRequired(true);
     $candidate_resumes->addValidator('NotEmpty', false, array('messages' => 'Please select file.'));
     $cand_status = new Zend_Form_Element_Select("cand_status");
     $cand_status->setRegisterInArrayValidator(false);
     $cand_status->setLabel("Status");
     $cand_status->setAttrib("class", "formDataElement");
     $cand_status->setAttrib('title', 'Candidate status');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'multiple-submit-button');
     $submit->setLabel('Save');
     $this->addElements(array($cand_status, $id, $requisition_id, $candidate_firstname, $candidate_lastname, $candidate_resumes, $submit));
     $this->setElementDecorators(array('ViewHelper'));
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:49,代码来源:Multipleresume.php


注:本文中的Zend_Form_Element_Hidden::setIsArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。