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


PHP Zend_Form_Element_Select::setRegisterInArrayValidator方法代码示例

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


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

示例1: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'positions');
     $id = new Zend_Form_Element_Hidden('id');
     $emptyflag = new Zend_Form_Element_Hidden('emptyFlag');
     $positionname = new Zend_Form_Element_Text('positionname');
     $positionname->setAttrib('maxLength', 50);
     $positionname->setRequired(true);
     $positionname->addValidator('NotEmpty', false, array('messages' => 'Please enter position.'));
     $positionname->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[a-zA-Z][a-zA-Z0-9\\-\\s]*$/i', 'messages' => array('regexNotMatch' => 'Please enter valid position.')))));
     $positionname->addValidator(new Zend_Validate_Db_NoRecordExists(array('table' => 'main_positions', 'field' => 'positionname', 'exclude' => 'id!="' . Zend_Controller_Front::getInstance()->getRequest()->getParam('id') . '" and isactive=1')));
     $positionname->getValidator('Db_NoRecordExists')->setMessage('Position already exists.');
     $jobtitleid = new Zend_Form_Element_Select('jobtitleid');
     $jobtitleid->setAttrib('class', 'selectoption');
     $jobtitleid->setRegisterInArrayValidator(false);
     $jobtitleid->addMultiOption('', 'Select Job Title');
     $jobtitleid->setRequired(true);
     $jobtitleid->addValidator('NotEmpty', false, array('messages' => 'Please select job title.'));
     $description = new Zend_Form_Element_Textarea('description');
     $description->setAttrib('rows', 10);
     $description->setAttrib('cols', 50);
     $description->setAttrib('maxlength', '200');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $positionname, $jobtitleid, $description, $emptyflag, $submit));
     $this->setElementDecorators(array('ViewHelper'));
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:30,代码来源:positions.php

示例2: __construct

 public function __construct($options = null)
 {
     parent::__construct($options);
     parent::__construct();
     $accountCode = new Zend_Form_Element_Hidden('accountcode');
     $memberId = new Zend_Form_Element_Hidden('membercode');
     $categoryId = new Zend_Form_Element_Hidden('categoryId');
     $newStatus = new Zend_Form_Element_Select('newStatus');
     $newStatus->setAttrib('class', 'NormalBtn');
     $newStatus->setRegisterInArrayValidator(false);
     $newStatus->setRequired(true);
     $newStatus->addMultiOption('', 'Select...');
     $description = new Zend_Form_Element_Textarea('description');
     $description->setAttrib('rows', '2');
     $description->setAttrib('cols', '20');
     $description->setRequired(true);
     $totalamount = new Zend_Form_Element_Text('totalamount');
     $totalamount->setAttrib('class', 'textfield');
     $totalamount->setAttrib('id', 'totalamount');
     $totalamount->setAttrib('readonly', 'true');
     $totalamount1 = new Zend_Form_Element_Hidden('totalamount1');
     $newStatus1 = new Zend_Form_Element_Hidden('newStatus1');
     $description1 = new Zend_Form_Element_Hidden('description1');
     $submit = new Zend_Form_Element_Submit('Save');
     $submit->setAttrib('id', 'save');
     $Confirm = new Zend_Form_Element_Submit('Confirm');
     $Confirm->setAttrib('class', 'officesubmit');
     $submit = new Zend_Form_Element_Submit('Submit');
     $submit->setAttrib('class', 'officesubmit');
     $this->addElements(array($submit, $newStatus, $description, $accountCode, $memberId, $categoryId, $totalamount, $Confirm, $totalamount1, $newStatus1, $description1));
 }
开发者ID:maniargaurav,项目名称:OurBank,代码行数:31,代码来源:FixedStatus.php

示例3: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('action', DOMAIN . 'monthslist/edit');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'monthslist');
     $id = new Zend_Form_Element_Hidden('id');
     $monthname = new Zend_Form_Element_Select('month_id');
     $monthname->setAttrib('class', 'selectoption');
     $monthname->setRegisterInArrayValidator(false);
     $monthname->setRequired(true);
     $monthname->addValidator('NotEmpty', false, array('messages' => 'Please select month name.'));
     $monthcode = new Zend_Form_Element_Text('monthcode');
     $monthcode->setAttrib('maxLength', 20);
     $monthcode->addFilter(new Zend_Filter_StringTrim());
     $monthcode->addValidator(new Zend_Validate_Db_NoRecordExists(array('table' => 'main_monthslist', 'field' => 'monthcode', 'exclude' => 'id!="' . Zend_Controller_Front::getInstance()->getRequest()->getParam('id') . '" and isactive=1')));
     $monthcode->getValidator('Db_NoRecordExists')->setMessage('Month code already exists.');
     $description = new Zend_Form_Element_Textarea('description');
     $description->setAttrib('rows', 10);
     $description->setAttrib('cols', 50);
     $description->setAttrib('maxlength', '200');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $url = "'monthslist/saveupdate/format/json'";
     $dialogMsg = "''";
     $toggleDivId = "''";
     $jsFunction = "'redirecttocontroller(\\'monthslist\\');'";
     $this->addElements(array($id, $monthname, $monthcode, $description, $submit));
     $this->setElementDecorators(array('ViewHelper'));
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:31,代码来源:monthslist.php

示例4: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'leavereport');
     $id = new Zend_Form_Element_Hidden('id');
     $employeename = new Zend_Form_Element_Text('employeename');
     $employeename->setLabel('Leave Applied By');
     $employeename->setAttrib('onblur', 'clearautocompletename(this)');
     $department = new Zend_Form_Element_Select('department');
     $department->setLabel('Department');
     $department->addMultiOption('', 'Select Department');
     $department->setAttrib('class', 'selectoption');
     $department->setRegisterInArrayValidator(false);
     $leavestatus = new Zend_Form_Element_Select('leavestatus');
     $leavestatus->setLabel('Leave Status');
     $leavestatus->setMultiOptions(array('' => 'Select Leave Status', '1' => 'Pending for approval', '2' => 'Approved', '3' => 'Rejected', '4' => 'Cancel'));
     $leavestatus->setRegisterInArrayValidator(false);
     $from_date = new ZendX_JQuery_Form_Element_DatePicker('from_date');
     $from_date->setLabel('Applied Date');
     $from_date->setAttrib('readonly', 'true');
     $from_date->setAttrib('onfocus', 'this.blur()');
     $from_date->setOptions(array('class' => 'brdr_none'));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $employeename, $department, $leavestatus, $from_date, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('from_date'));
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:30,代码来源:leavereport.php

示例5: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('action', DOMAIN . 'workeligibilitydoctypes/edit');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'workeligibilitydoctypes');
     $id = new Zend_Form_Element_Hidden('id');
     $documenttype = new Zend_Form_Element_Text('documenttype');
     $documenttype->setAttrib('maxLength', 50);
     $documenttype->setRequired(true);
     $documenttype->addValidator('NotEmpty', false, array('messages' => 'Please enter document type.'));
     $documenttype->addValidator("regex", true, array('pattern' => '/^(?=.*[a-zA-Z])([^ ][a-zA-Z0-9\\-\\s]*)$/', 'messages' => array('regexNotMatch' => 'Please enter valid document type.')));
     $documenttype->addValidator(new Zend_Validate_Db_NoRecordExists(array('table' => 'main_workeligibilitydoctypes', 'field' => 'documenttype', 'exclude' => 'id!="' . Zend_Controller_Front::getInstance()->getRequest()->getParam('id') . '" and isactive=1')));
     $documenttype->getValidator('Db_NoRecordExists')->setMessage('Document type already exists.');
     $issuingauthority = new Zend_Form_Element_Select('issuingauthority');
     $issuingauthority->setRegisterInArrayValidator(false);
     $issuingauthority->setMultiOptions(array('' => 'Select issuing authority', '1' => 'Country', '2' => 'State', '3' => 'City'));
     $issuingauthority->setRequired(true);
     $issuingauthority->addValidator('NotEmpty', false, array('messages' => 'Please select issuing authority.'));
     $description = new Zend_Form_Element_Textarea('description');
     $description->setAttrib('rows', 10);
     $description->setAttrib('cols', 50);
     $description->setAttrib('maxlength', '200');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $documenttype, $issuingauthority, $description, $submit));
     $this->setElementDecorators(array('ViewHelper'));
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:29,代码来源:workeligibilitydoctypes.php

示例6: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'leavemanagementreport');
     $id = new Zend_Form_Element_Hidden('id');
     $department = new Zend_Form_Element_Select('department_id');
     $department->setLabel('Department');
     $department->addMultiOption('', 'Select Department');
     $department->setAttrib('class', 'selectoption');
     $department->setRegisterInArrayValidator(false);
     $month = new Zend_Form_Element_Select('cal_startmonth');
     $month->setLabel('Start Month');
     $month->addMultiOption('', 'Select Calendar Start Month');
     $month->setAttrib('class', 'selectoption');
     $month->setRegisterInArrayValidator(false);
     $weekend_startday = new Zend_Form_Element_Select('weekend_startday');
     $weekend_startday->setLabel('Week-end 1');
     $weekend_startday->addMultiOption('', 'Select Weekend Start Day');
     $weekend_startday->setAttrib('class', 'selectoption');
     $weekend_startday->setRegisterInArrayValidator(false);
     $weekend_endday = new Zend_Form_Element_Select('weekend_endday');
     $weekend_endday->setLabel('Week-end 2');
     $weekend_endday->addMultiOption('', 'Select Weekend End Day');
     $weekend_endday->setAttrib('class', 'selectoption');
     $weekend_endday->setRegisterInArrayValidator(false);
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $department, $month, $weekend_startday, $weekend_endday, $submit));
     $this->setElementDecorators(array('ViewHelper'));
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:32,代码来源:leavemanagementreport.php

示例7: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('action', DOMAIN . 'employee/add');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'empskills');
     $id = new Zend_Form_Element_Hidden('id');
     $userid = new Zend_Form_Element_Hidden('user_id');
     $skillname = new Zend_Form_Element_Text('skillname');
     $skillname->setRequired(true);
     $skillname->setAttrib('maxLength', 50);
     $skillname->addFilter('StripTags');
     $skillname->addFilter('StringTrim');
     $skillname->addValidator('NotEmpty', false, array('messages' => 'Please enter skill.'));
     $yearsofexp = new Zend_Form_Element_Text('yearsofexp');
     $yearsofexp->setAttrib('maxLength', 5);
     $yearsofexp->addFilter(new Zend_Filter_StringTrim());
     $yearsofexp->setRequired(true);
     $yearsofexp->addValidator('NotEmpty', false, array('messages' => 'Please enter years of experience.'));
     $yearsofexp->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[0-9]\\d{0,1}(\\.\\d*)?$/', 'messages' => array('regexNotMatch' => 'Please enter numbers less than 100.')))));
     $competencylevelid = new Zend_Form_Element_Select('competencylevelid');
     $competencylevelid->setRequired(true)->addErrorMessage('Please select competency level.');
     $competencylevelid->addValidator('NotEmpty', false, array('messages' => 'Please select competency level.'));
     $competencylevelid->setRegisterInArrayValidator(false);
     $year_skill = new ZendX_JQuery_Form_Element_DatePicker('year_skill_last_used');
     $year_skill->setOptions(array('class' => 'brdr_none'));
     $year_skill->setAttrib('readonly', 'true');
     $year_skill->setAttrib('onfocus', 'this.blur()');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $userid, $skillname, $yearsofexp, $competencylevelid, $year_skill, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('year_skill_last_used'));
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:35,代码来源:empskills.php

示例8: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('action', DOMAIN . 'employmentstatus/edit');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'employmentstatus');
     $id = new Zend_Form_Element_Hidden('id');
     $workcode = new Zend_Form_Element_Text('workcode');
     $workcode->setAttrib('maxLength', 20);
     $workcode->setRequired(true);
     $workcode->addValidator('NotEmpty', false, array('messages' => 'Please enter work short code.'));
     $workcode->addValidator("regex", true, array('pattern' => '/^(?=.*[a-zA-Z])([^ ][a-zA-Z0-9 ]*)$/', 'messages' => array('regexNotMatch' => 'Please enter valid work short code.')));
     $workcodename = new Zend_Form_Element_Select('workcodename');
     $workcodename->setAttrib('class', 'selectoption');
     $workcodename->setRegisterInArrayValidator(false);
     $workcodename->setRequired(true);
     $workcodename->addValidator('NotEmpty', false, array('messages' => 'Please select work code.'));
     $description = new Zend_Form_Element_Textarea('description');
     $description->setAttrib('rows', 10);
     $description->setAttrib('cols', 50);
     $description->setAttrib('maxlength', '200');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $workcode, $workcodename, $description, $submit));
     $this->setElementDecorators(array('ViewHelper'));
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:27,代码来源:employmentstatus.php

示例9: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'frm_interview_rpt');
     $interview_date = new Zend_Form_Element_Text("interview_date");
     $interview_date->setLabel("Interview Date");
     $interview_date->setAttrib('readonly', 'readonly');
     $req_id = new Zend_Form_Element_Select("req_id");
     $req_id->setRegisterInArrayValidator(false);
     $req_id->setLabel("Requisition Code")->addMultiOptions(array('' => 'Select Requisition Code'));
     $department_id = new Zend_Form_Element_Select("department_id");
     $department_id->setLabel("Department");
     $department_id->setRegisterInArrayValidator(false);
     $department_id->addMultiOptions(array('' => 'Select Department'));
     $interviewer_id = new Zend_Form_Element_Text("interviewer_id");
     $interviewer_id->setLabel("Interviewer");
     $interviewer_id->setAttrib('name', '');
     $interviewer_id->setAttrib('id', 'idinterviewer_id');
     $createdby = new Zend_Form_Element_Text("createdby");
     $createdby->setLabel("Interview Planned By");
     $createdby->setAttrib('name', '');
     $createdby->setAttrib('id', 'idcreatedby');
     $submit = new Zend_Form_Element_Button('submit');
     $submit->setAttrib('id', 'idsubmitbutton');
     $submit->setLabel('Report');
     $this->addElements(array($submit, $interview_date, $req_id, $department_id, $interviewer_id, $createdby));
     $this->setElementDecorators(array('ViewHelper'));
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:29,代码来源:Interviewroundrpt.php

示例10: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'emailcontacts');
     $this->setAttrib('action', BASE_URL . 'emailcontacts/add/');
     $id = new Zend_Form_Element_Hidden('id');
     $group_id = new Zend_Form_Element_Select("group_id");
     $group_id->setRegisterInArrayValidator(false);
     $group_id->setRequired(true);
     $group_id->addValidator('NotEmpty', false, array('messages' => 'Please select group.'));
     $business_unit_id = new Zend_Form_Element_Select("business_unit_id");
     $business_unit_id->setRegisterInArrayValidator(false);
     $business_unit_id->setRequired(true);
     $business_unit_id->addValidator('NotEmpty', false, array('messages' => 'Please select business unit.'));
     $business_unit_id->setAttrib('onchange', "bunit_emailcontacts('business_unit_id');");
     //Group Email....
     $grpEmail = new Zend_Form_Element_Text('groupEmail');
     $grpEmail->addFilters(array('StringTrim', 'StripTags'));
     $grpEmail->setRequired(true);
     $grpEmail->addValidator('NotEmpty', false, array('messages' => 'Please enter group email.'));
     $grpEmail->addValidator("regex", true, array('pattern' => '/^(?!.*\\.{2})[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$/', 'messages' => array('regexNotMatch' => 'Please enter valid email.')));
     $grpEmail->addValidator(new Zend_Validate_Db_NoRecordExists(array('table' => 'main_emailcontacts', 'field' => 'groupEmail', 'exclude' => 'id!="' . Zend_Controller_Front::getInstance()->getRequest()->getParam('id') . '" and isactive = 1')));
     $grpEmail->getValidator('Db_NoRecordExists')->setMessage('Group email already exists.');
     // Form Submit .........
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $group_id, $grpEmail, $submit, $business_unit_id));
     $this->setElementDecorators(array('ViewHelper'));
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:31,代码来源:emailcontacts.php

示例11: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('action', DOMAIN . 'states/edit');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'states');
     $id = new Zend_Form_Element_Hidden('id');
     $country = new Zend_Form_Element_Select('countryid');
     $country->setAttrib('class', 'selectoption');
     $country->setAttrib('onchange', 'displayParticularState(this,"otheroption","state","")');
     $country->setRegisterInArrayValidator(false);
     $country->addMultiOption('', 'Select Country');
     $country->setRequired(true);
     $country->addValidator('NotEmpty', false, array('messages' => 'Please select country.'));
     $state = new Zend_Form_Element_Multiselect('state');
     $state->setAttrib('onchange', 'displayStateCode(this)');
     $state->setRegisterInArrayValidator(false);
     $state->setRequired(true);
     $state->addValidator('NotEmpty', false, array('messages' => 'Please select state.'));
     $state->addValidator(new Zend_Validate_Db_NoRecordExists(array('table' => 'main_states', 'field' => 'state_id_org', 'exclude' => 'id!="' . Zend_Controller_Front::getInstance()->getRequest()->getParam('id') . '" and isactive=1')));
     $state->getValidator('Db_NoRecordExists')->setMessage('State already exists.');
     $otherstatename = new Zend_Form_Element_Text('otherstatename');
     $otherstatename->setAttrib('maxLength', 20);
     $otherstatename->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[^ ][a-zA-Z\\s]*$/i', 'messages' => array('regexNotMatch' => 'Please enter valid state name.')))));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $country, $state, $otherstatename, $submit));
     $this->setElementDecorators(array('ViewHelper'));
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:30,代码来源:states.php

示例12: init

 public function init()
 {
     // profissional_beleza_id
     $profissional_beleza_id = new Zend_Form_Element_Radio("profissional_beleza_id");
     $profissional_beleza_id->setLabel("Selecione o profissional desejado: ");
     $profissional_beleza_id->setRegisterInArrayValidator(false);
     $profissional_beleza_id->setRequired();
     $profissional_beleza_id->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     // agenda_data
     $agenda_data = new Zend_Form_Element_Text("agenda_data");
     $agenda_data->setLabel("Selecione a data: ");
     $agenda_data->setAttribs(array('class' => 'form-control', 'autocomplete' => 'off'));
     $agenda_data->setRequired();
     $agenda_data->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     // agenda_hora
     $agenda_hora = new Zend_Form_Element_Select("agenda_hora");
     $agenda_hora->setLabel('Selecione a hora: ');
     $agenda_hora->setAttribs(array('class' => 'form-control'));
     $agenda_hora->setMultiOptions(array('' => 'Horários'));
     $agenda_hora->setRequired();
     $agenda_hora->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     $agenda_hora->setRegisterInArrayValidator(false);
     // agenda_observacao
     $agenda_observacao = new Zend_Form_Element_Textarea("agenda_observacao");
     $agenda_observacao->setLabel("Observações: ");
     $agenda_observacao->setAttribs(array('class' => 'form-control', 'rows' => 7, 'placeholder' => 'Informe alguma observação, por exemplo, alguma preferência de produto, etc.'));
     // salao_id
     $salao_id = new Zend_Form_Element_Hidden('salao_id');
     // especialidade_id
     $especialidade_id = new Zend_Form_Element_Hidden("especialidade_id");
     // usuario_id
     $usuario_id = new Zend_Form_Element_Hidden("usuario_id");
     $this->addElements(array($profissional_beleza_id, $agenda_data, $agenda_hora, $agenda_observacao, $salao_id, $especialidade_id, $usuario_id));
     parent::init();
 }
开发者ID:nandorodpires2,项目名称:homemakes,代码行数:35,代码来源:Agendar.php

示例13: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'emppersonaldetails');
     $id = new Zend_Form_Element_Hidden('id');
     $userid = new Zend_Form_Element_Hidden('user_id');
     $genderid = new Zend_Form_Element_Select('genderid');
     $genderid->addMultiOption('', 'Select Gender');
     $genderid->setRegisterInArrayValidator(false);
     $genderid->setRequired(true);
     $genderid->addValidator('NotEmpty', false, array('messages' => 'Please select gender.'));
     $maritalstatusid = new Zend_Form_Element_Select('maritalstatusid');
     $maritalstatusid->addMultiOption('', 'Select Marital Status');
     $maritalstatusid->setRegisterInArrayValidator(false);
     $maritalstatusid->setRequired(true);
     $maritalstatusid->addValidator('NotEmpty', false, array('messages' => 'Please select marital status.'));
     $ethniccodeid = new Zend_Form_Element_Select('ethniccodeid');
     $ethniccodeid->addMultiOption('', 'Select Ethnic Code');
     $ethniccodeid->setLabel('Ethnic Code');
     $ethniccodeid->setRegisterInArrayValidator(false);
     $racecodeid = new Zend_Form_Element_Select('racecodeid');
     $racecodeid->addMultiOption('', 'Select Race Code');
     $racecodeid->setLabel('Race Code');
     $racecodeid->setRegisterInArrayValidator(false);
     $languageid = new Zend_Form_Element_Select('languageid');
     $languageid->addMultiOption('', 'Select Language');
     $languageid->setLabel('Language');
     $languageid->setRegisterInArrayValidator(false);
     $nationalityid = new Zend_Form_Element_Select('nationalityid');
     $nationalityid->addMultiOption('', 'Select Nationality');
     $nationalityid->setRegisterInArrayValidator(false);
     $nationalityid->setRequired(true);
     $nationalityid->addValidator('NotEmpty', false, array('messages' => 'Please select nationality.'));
     $dob = new ZendX_JQuery_Form_Element_DatePicker('dob');
     $dob->setOptions(array('class' => 'brdr_none'));
     $dob->setRequired(true);
     $dob->setAttrib('readonly', 'true');
     $dob->setAttrib('onfocus', 'this.blur()');
     $dob->addValidator('NotEmpty', false, array('messages' => 'Please select date of birth.'));
     //DOB should not be current date....
     $celebrated_dob = new ZendX_JQuery_Form_Element_DatePicker('celebrated_dob');
     $celebrated_dob->setOptions(array('class' => 'brdr_none'));
     $celebrated_dob->setAttrib('readonly', 'true');
     $celebrated_dob->setAttrib('onfocus', 'this.blur()');
     $bloodgroup = new Zend_Form_Element_Text('bloodgroup');
     $bloodgroup->setAttrib('size', 5);
     $bloodgroup->setAttrib('maxlength', 10);
     /*$submit = new Zend_Form_Element_Submit('submit');
     		$submit->setAttrib('id', 'submitbutton');
     		$submit->setLabel('Save');*/
     $submitadd = new Zend_Form_Element_Button('submitbutton');
     $submitadd->setAttrib('id', 'submitbuttons');
     $submitadd->setAttrib('onclick', 'validatedocumentonsubmit(this)');
     $submitadd->setLabel('Save');
     $this->addElements(array($id, $userid, $genderid, $maritalstatusid, $nationalityid, $ethniccodeid, $racecodeid, $languageid, $dob, $celebrated_dob, $bloodgroup, $submitadd));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('dob', 'celebrated_dob'));
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:59,代码来源:emppersonaldetails.php

示例14: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'empsalarydetails');
     $id = new Zend_Form_Element_Hidden('id');
     $userid = new Zend_Form_Element_Hidden('user_id');
     $currencyid = new Zend_Form_Element_Select('currencyid');
     $currencyid->setLabel('Salary Currency');
     $currencyid->setRegisterInArrayValidator(false);
     $salarytype = new Zend_Form_Element_Select('salarytype');
     $salarytype->setLabel("Pay Frequency");
     $salarytype->setAttrib('id', 'jobpayfrequency');
     //$salarytype->setAttrib('onchange', 'changesalarytext(this)');
     $salarytype->setRegisterInArrayValidator(false);
     /* $salarytype->setMultiOptions(array(	
        '' => 'Select Salary Type',
        '1'=>'Yearly' ,
        '2'=>'Hourly',
        )); */
     $salary = new Zend_Form_Element_Text('salary');
     $salary->setLabel("Salary");
     $salary->setAttrib('maxLength', 8);
     $salary->addFilter(new Zend_Filter_StringTrim());
     $salary->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[0-9\\.]*$/', 'messages' => array('regexNotMatch' => 'Please enter only numbers.')))));
     $bankname = new Zend_Form_Element_Text('bankname');
     $bankname->setAttrib('maxlength', 40);
     $bankname->setLabel('Bank Name');
     $bankname->addFilters(array('StringTrim'));
     $bankname->addValidator("regex", true, array('pattern' => '/^[a-zA-Z][a-zA-Z0-9\\-\\. ]*$/', 'messages' => array('regexNotMatch' => 'Please enter valid bank name.')));
     $accountholder_name = new Zend_Form_Element_Text('accountholder_name');
     $accountholder_name->setAttrib('maxlength', 40);
     $accountholder_name->setLabel('Account Holder Name');
     $accountholder_name->addFilters(array('StringTrim'));
     $accountholder_name->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[a-zA-Z\\s]+$/i', 'messages' => array('regexNotMatch' => 'Please enter only alphabets.')))));
     $accountholding = new ZendX_JQuery_Form_Element_DatePicker('accountholding');
     $accountholding->setLabel('Account Holding Since');
     $accountholding->setAttrib('readonly', 'true');
     $accountholding->setAttrib('onfocus', 'this.blur()');
     $accountholding->setOptions(array('class' => 'brdr_none'));
     $accountclasstypeid = new Zend_Form_Element_Select('accountclasstypeid');
     $accountclasstypeid->setLabel('Account Class Type');
     $accountclasstypeid->setRegisterInArrayValidator(false);
     $bankaccountid = new Zend_Form_Element_Select('bankaccountid');
     $bankaccountid->setLabel('Account Type');
     $bankaccountid->setRegisterInArrayValidator(false);
     $accountnumber = new Zend_Form_Element_Text('accountnumber');
     $accountnumber->setAttrib('maxlength', 20);
     $accountnumber->setLabel('Account Number');
     $accountnumber->addFilters(array('StringTrim'));
     $accountnumber->addValidator("regex", true, array('pattern' => '/^[a-zA-Z0-9 ]*$/', 'messages' => array('regexNotMatch' => 'Please enter only alphanumeric characters.')));
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $userid, $currencyid, $salarytype, $salary, $bankname, $accountholder_name, $accountholding, $accountclasstypeid, $bankaccountid, $accountnumber, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('accountholding'));
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:58,代码来源:empsalarydetails.php

示例15: init

 public function init()
 {
     $this->setMethod('post');
     $this->setAttrib('id', 'formid');
     $this->setAttrib('name', 'workeligibilitydetails');
     $id = new Zend_Form_Element_Hidden('id');
     $userid = new Zend_Form_Element_Hidden('user_id');
     $emptyflag = new Zend_Form_Element_Hidden('emptyFlag');
     $issuingauthflag = new Zend_Form_Element_Hidden('issuingauthflag');
     //Document type Id....
     $docType = new Zend_Form_Element_Select('documenttype_id');
     $docType->setRegisterInArrayValidator(false);
     $docType->setAttrib('onchange', 'checkissuingauthority(this)');
     $docType->addMultiOption('', 'Select Document Type');
     //Document Issue Date...
     $doc_issue_date = new ZendX_JQuery_Form_Element_DatePicker('doc_issue_date');
     $doc_issue_date->setOptions(array('class' => 'brdr_none'));
     $doc_issue_date->setAttrib('readonly', 'true');
     $doc_issue_date->setAttrib('onfocus', 'this.blur()');
     // Document Expiry Date...
     $doc_expiry_date = new ZendX_JQuery_Form_Element_DatePicker('doc_expiry_date');
     $doc_expiry_date->setAttrib('readonly', 'true');
     $doc_expiry_date->setAttrib('onfocus', 'this.blur()');
     $doc_expiry_date->setOptions(array('class' => 'brdr_none'));
     // Expiration Date should be greater than today's date...
     // issuing authority name...
     $issueAuth_name = new Zend_Form_Element_Text('issuingauth_name');
     $issueAuth_name->setAttrib('maxLength', 50);
     $issueAuth_name->addFilter(new Zend_Filter_StringTrim());
     $issueAuth_name->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^[a-zA-Z][a-zA-Z0-9\\-\\&\\s]+$/i', 'messages' => array('regexNotMatch' => 'Please enter valid name.')))));
     //issuing authority country.....
     $country = new Zend_Form_Element_Select('issuingauth_country');
     $country->setAttrib('onchange', 'displayParticularState(this,"","issuingauth_state","")');
     $country->setRegisterInArrayValidator(false);
     //issuing authority state.....
     $state = new Zend_Form_Element_Select('issuingauth_state');
     $state->setAttrib('onchange', 'displayParticularCity(this,"","issuingauth_city","")');
     $state->setRegisterInArrayValidator(false);
     $state->addMultiOption('', 'Select State');
     //issuing authority city.....
     $city = new Zend_Form_Element_Select('issuingauth_city');
     $city->setRegisterInArrayValidator(false);
     $city->addMultiOption('', 'Select City');
     //issuing authority postal code .....
     $issuingAuth_pcode = new Zend_Form_Element_Text('issuingauth_postalcode');
     $issuingAuth_pcode->addFilter(new Zend_Filter_StringTrim());
     $issuingAuth_pcode->setAttrib("maxlength", 10);
     $issuingAuth_pcode->addValidators(array(array('StringLength', false, array('min' => 3, 'max' => 10, 'messages' => array(Zend_Validate_StringLength::TOO_LONG => 'Issuing authority postal code must contain at most %max% characters.', Zend_Validate_StringLength::TOO_SHORT => 'Issuing authority postal code must contain at least %min% characters.')))));
     $issuingAuth_pcode->addValidators(array(array('validator' => 'Regex', 'breakChainOnFailure' => true, 'options' => array('pattern' => '/^(?!0{3})[0-9a-zA-Z]+$/', 'messages' => array('regexNotMatch' => 'Please enter valid postal code.')))));
     // Form Submit .........
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setAttrib('id', 'submitbutton');
     $submit->setLabel('Save');
     $this->addElements(array($id, $userid, $issuingauthflag, $docType, $doc_issue_date, $doc_expiry_date, $issueAuth_name, $country, $state, $city, $issuingAuth_pcode, $emptyflag, $submit));
     $this->setElementDecorators(array('ViewHelper'));
     $this->setElementDecorators(array('UiWidgetElement'), array('doc_issue_date', 'doc_expiry_date'));
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:57,代码来源:Workeligibilitydetails.php


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