public function __construct($options = null) { Zend_Dojo::enableForm($this); parent::__construct($options); $app = APPLICATION_PATH; $accountHeader = new Zend_Form_Element_Text('accountHeader'); $accountHeader->setAttrib('class', 'txt_put'); $accountHeader->setAttrib('id', 'accountHeader'); $accountHeader->setRequired(true)->addValidators(array(array('NotEmpty'))); $glcodeDescription = new Zend_Form_Element_Textarea('glcodeDescription', array('rows' => 3, 'cols' => 25)); $glcodeDescription->setAttrib('id', 'glcodeDescription'); $glcodeDescription->setRequired(true)->addValidators(array(array('NotEmpty'))); $product = new Zend_Form_Element_Select('product'); $product->setAttrib('select', '-----'); $product->setAttrib('class', 'txt_put'); $product->setRequired(true)->addValidators(array(array('NotEmpty'))); $offerproduct = new Zend_Form_Element_Select('offerproduct'); $offerproduct->setAttrib('select', '-----'); $offerproduct->setAttrib('class', 'txt_put'); $subheader = new Zend_Form_Element_Text('subheader'); $subheader->setAttrib('class', 'txt_put'); $subheader->setAttrib('id', 'subheader'); $glsubaccountdescription = new Zend_Form_Element_Textarea('glsubaccountdescription', array('rows' => 3, 'cols' => 25)); $glsubaccountdescription->setAttrib('id', 'glsubaccountdescription'); $submit = new Zend_Form_Element_Submit('Save'); $submit->setAttrib('id', 'Save'); $submit->setAttrib('class', 'holiday1'); $this->addElements(array($submit, $accountHeader, $glcodeDescription, $subheader, $glsubaccountdescription, $product, $offerproduct)); $glcodeUpdateId = new Zend_Form_Element_Hidden('glcodeUpdateId'); $glsubcodeupdate_id = new Zend_Form_Element_Hidden('glsubcodeupdate_id'); $submit = new Zend_Form_Element_Submit('Submit'); $submit->setAttrib('class', 'holiday'); $this->addElements(array($submit, $glcodeUpdateId, $glsubcodeupdate_id)); }
public function __construct($currencysymbol) { Zend_Dojo::enableForm($this); parent::__construct($options); $finename = new Zend_Form_Element_Text('finename'); $finename->setRequired(true)->addValidators(array(array('NotEmpty'))); $finename->setAttrib('class', 'txt_put'); $finename->setAttrib('id', 'finename'); $membertype = new Zend_Form_Element_Select('membertype'); $membertype->setAttrib('class', 'selectbutton'); $membertype->setAttrib('id', 'membertype'); $membertype->setRequired(true)->addValidators(array(array('NotEmpty'))); $finedescription = new Zend_Form_Element_Text('finedescription'); $finedescription->setAttrib('class', 'txt_put'); $finedescription->setAttrib('id', 'finedescription'); $finedescription->setRequired(true)->addValidators(array(array('NotEmpty'))); $finevalue = new Zend_Form_Element_Text('finevalue'); $finevalue->setAttrib('class', 'txt_put'); $finevalue->setAttrib('id', 'finevalue'); $finevalue->setAttrib('size', '6'); $finevalue->setRequired(true)->addValidators(array(array('NotEmpty'))); $submit = new Zend_Form_Element_Submit('Save'); $submit->setAttrib('id', 'save'); $this->addElements(array($finename, $finedescription, $membertype, $finevalue)); $fineId = new Zend_Form_Element_Hidden('fineId'); $submit = new Zend_Form_Element_Submit('Submit'); $submit->setAttrib('class', 'finesubmit'); $submit->setLabel('submit'); $this->addElements(array($submit, $fineId)); }
public function __construct() { $transactionType = new Zend_Form_Element_Select('transactionType'); $transactionType->setAttrib('class', 'NormalBtn'); $transactionType->setRequired(true)->addValidators(array(array('NotEmpty'))); $transactionMode = new Zend_Form_Element_Select('transactionMode'); $transactionMode->setAttrib('class', 'NormalBtn'); $transactionMode->setRequired(true); // ->addValidators(array(array('NotEmpty'))); $transactionMode->setAttrib('onchange', 'display(this.value);'); $transaction_interest_amount = new Zend_Form_Element_Text('transaction_interest_amount'); $transaction_interest_amount->setAttrib('class', 'NormalBtn'); $transaction_fine_amount = new Zend_Form_Element_Text('transaction_fine_amount'); $transaction_fine_amount->setAttrib('class', 'NormalBtn'); $account_id = new Zend_Form_Element_Text('account_id'); $account_id->setAttrib('class', 'NormalBtn'); $transaction_date = new Zend_Form_Element_Text('transaction_date'); $transaction_date->setAttrib('class', 'NormalBtn'); $transaction_date->setRequired(true)->addValidators(array(array('NotEmpty'))); $transaction_date->setRequired(true)->addValidator(new Zend_Validate_Date('YYYY-MM-DD'), true, array('messages' => array(Zend_Validate_Date::FALSEFORMAT => 'Enter the valid date'))); $transaction_amount = new Zend_Form_Element_Text('transaction_amount'); $transaction_amount->setAttrib('class', 'NormalBtn'); $transaction_remarks = new Zend_Form_Element_Textarea('transaction_remarks', array('rows' => 3, 'cols' => 15)); $transaction_remarks->setAttrib('class', 'NormalBtn'); $transaction_remarks->setRequired(true)->addValidators(array(array('NotEmpty'))); $submit = new Zend_Form_Element_Submit('submit'); $submit->setAttrib('id', 'submit'); $submit->setAttrib('class', 'NormalBtn'); $submit->setLabel('submit'); $this->addElements(array($transactionType, $transactionMode, $transaction_interest_amount, $transaction_fine_amount, $account_id, $transaction_date, $transaction_amount, $transaction_remarks, $submit)); }
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')); }
public function __construct($options = null) { parent::__construct($options); $accountId1 = new Zend_Form_Element_Hidden('accountId'); $productId1 = new Zend_Form_Element_Hidden('productId'); $memberId1 = new Zend_Form_Element_Hidden('memberId'); $maturedamount = new Zend_Form_Element_Hidden('maturedinterestamount'); $interestamountto = new Zend_Form_Element_Hidden('interestamountto'); $capitalamount = new Zend_Form_Element_Hidden('capitalamount'); $penalinterest = new Zend_Form_Element_Hidden('penalinterest'); $paymenttype = new Zend_Form_Element_Select('paymenttype'); $paymenttype->addMultiOption('', 'select..'); $paymenttype->setAttrib('class', 'NormalBtn'); $paymenttype->setAttrib('id', 'paymenttype'); $paymenttype->setAttrib('onchange', 'toggleField();'); $paymenttype->setRequired(true); $description = new Zend_Form_Element_Textarea('transactiondescription'); $description->setAttrib('class', 'textfield'); $description->setAttrib('rows', '2'); $description->setAttrib('cols', '20'); $no = new Zend_Form_Element_Textarea('paymenttype_details'); $no->setAttrib('class', 'textfield'); $no->setAttrib('rows', '1'); $no->setAttrib('cols', '20'); $no->setAttrib('id', 'paymenttype_details'); $no->setAttrib('style', 'display:none;'); $no->setRequired(true); $submit = new Zend_Form_Element_Submit('Finalize'); $submit->setLabel('Finalize'); $submit->setAttrib('class', 'recurring'); $this->addElements(array($accountId1, $productId1, $memberId1, $maturedamount, $submit, $capitalamount, $interestamountto, $penalinterest, $paymenttype, $description, $no)); }
public function init() { $this->setMethod('post'); $this->setAttrib('id', 'formid'); $this->setAttrib('name', 'frm_requisition_report'); $raised_by = new Zend_Form_Element_Text("raised_by"); $raised_by->setLabel("Raised By"); $raised_by->setAttrib('name', ''); $raised_by->setAttrib('id', 'idraised_by'); $raised_by->setAttrib('title', 'Raised By'); $requisition_status = new Zend_Form_Element_Select("req_status"); $requisition_status->setLabel("Requisition Status"); $requisition_status->addMultiOptions(array('' => 'Select Requisition Status', 'Initiated' => 'Initiated', 'Approved' => 'Approved', 'Rejected' => 'Rejected', 'Closed' => 'Closed', 'On hold' => 'On hold', 'Complete' => 'Complete', 'In process' => 'In process')); $requisition_status->setAttrib('title', 'Requisition Status'); $raised_in = new Zend_Form_Element_Select('createdon'); $raised_in->setLabel('Raised In'); $raised_in->setAttrib('id', 'createdon'); $reporting_manager = new Zend_Form_Element_Text("reporting_manager"); $reporting_manager->setLabel("Reporting Manager"); $reporting_manager->setAttrib('name', ''); $reporting_manager->setAttrib('id', 'idreporting_manager'); $job_title = new Zend_Form_Element_Select("jobtitle"); $job_title->setLabel("Job Title"); $job_title->setAttrib("onchange", "getpositions_req('department','business_unit','position_id','jobtitle');"); $job_title->setAttrib('title', 'Job Title.'); $submit = new Zend_Form_Element_Button('submit'); $submit->setAttrib('id', 'idsubmitbutton'); $submit->setLabel('Report'); $this->addElements(array($raised_by, $requisition_status, $raised_in, $reporting_manager, $job_title, $submit)); $this->setElementDecorators(array('ViewHelper')); }
public function __construct($minimumDeposit) { parent::__construct($minimumDeposit); $date1 = new ZendX_JQuery_Form_Element_DatePicker('date1', array('label' => 'Date:')); $date1->setAttrib('class', 'txt_put'); $date1->setJQueryParam('dateFormat', 'yy-mm-dd'); $date1->setRequired(true); $period = new Zend_Form_Element_Select('period'); $period->addMultiOption('', 'Select...'); $period->setAttrib('class', 'txt_put'); $period->setRequired(true)->addValidators(array(array('NotEmpty'))); $period->setAttrib('onchange', 'getInterests(this.value)'); $interest = new Zend_Form_Element_Text('interest'); $interest->setAttrib('class', 'txt_put'); $recuringamount = new Zend_Form_Element_Text('recuringamount'); $recuringamount->setAttrib('class', 'txt_put'); $amount = new Zend_Form_Element_Text('amount'); $amount->addValidators(array(array('Float'), array('GreaterThan', false, array($minimumDeposit - 0.0001, 'messages' => array('notGreaterThan' => 'Minimum Amount To open a savings account =' . $minimumDeposit))))); $amount->setAttrib('class', 'txt_put'); $amount->setRequired(true); $amount->setAttrib('onchange', 'calculateTotalAmount(this.value)'); $memberfirstname = new Zend_Form_Element_MultiCheckbox('memberfirstname'); $memberfirstname->setAttrib('class', 'textfield'); $memberfirstname->setRequired(true); $memberId = new Zend_Form_Element_Hidden('memberId'); $productId = new Zend_Form_Element_Hidden('productId'); $typeId = new Zend_Form_Element_Hidden('typeId'); $memberTypeIdv = new Zend_Form_Element_Hidden('memberTypeIdv'); $submit = new Zend_Form_Element_Submit('Submit'); $Yes = new Zend_Form_Element_Submit('Yes'); $back = new Zend_Form_Element_Submit('Back'); $this->addElements(array($submit, $amount, $period, $interest, $recuringamount, $memberfirstname, $memberId, $date1, $productId, $typeId, $memberTypeIdv, $back, $Yes)); }
public function __construct($path) { parent::__construct($path); $formfield = new App_Form_Field(); // $fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$decorator,$value $meeting_name = $formfield->field('Text', 'meeting_name', '', '', 'mand', '', true, '', '', '', '', '', '', ''); $meeting_name->addValidator('Alnum', true, array('allowWhiteSpace' => true)); $group_head = $formfield->field('Text', 'group_head', '', '', 'mand', '', '', '', '', '', '', '', '', ''); $group_head->setAttrib('readonly', 'readonly'); $hiddenId = new Zend_Form_Element_Hidden('group_head_id'); $meeting_place = $formfield->field('Text', 'meeting_place', '', '', 'mand', '', true, '', '', '', '', '', '', ''); $meeting_place->addValidator('Alnum', true, array('allowWhiteSpace' => true)); $meeting_time = $formfield->field('Text', 'meeting_time', '', '', 'mand', '', true, '', '', '', '', '', '', ''); $institute_bank_id = new Zend_Form_Element_Select('institute_bank_id'); $institute_bank_id->addMultiOption('', 'Select...'); $institute_bank_id->setAttrib('class', 'txt_put'); $institute_bank_id->setAttrib('onchange', 'getGroups(this.value,"' . $path . '")'); $institute_bank_id->addValidators(array(array('NotEmpty'))); $group_name = new Zend_Form_Element_Select('group_name'); $group_name->addMultiOption('', 'Select...'); $group_name->setAttrib('class', 'txt_put'); $group_name->setAttrib('onchange', 'getHeadName(this.value,"' . $path . '")'); $group_name->setRequired(true)->setRegisterInArrayValidator(false)->addValidators(array(array('NotEmpty'))); $meeting_day = $formfield->field('Select', 'meeting_day', '', '', 'mand', '', true, '', '', '', '', '', '', ''); $submit = $formfield->field('Submit', 'Submit', '', '', '', 'Submit', '', '', '', '', '', '', '', ''); $Back = $formfield->field('Submit', 'Back', '', '', '', 'Back', '', '', '', '', '', '', '', ''); $this->addElements(array($meeting_name, $group_head, $meeting_place, $meeting_time, $institute_bank_id, $group_name, $meeting_day, $Back, $hiddenId, $submit)); }
public function init() { $this->setMethod('post'); $this->setAction('/main/new'); $this->setAttrib('id', 'newRoute'); $note = new Zend_Form_Element_Note('title', array('value' => '<h2 id="titleProductDetails">Create a New Route</h2>')); $intermed = new Zend_Form_Element_Hidden('intermed'); $intermed->setAttrib('readonly', 'readonly'); $intermed->addFilter('StripTags'); $intermed->addFilter('HtmlEntities'); $intermed->addFilter('StringTrim'); $start = new Zend_Form_Element_Text('startForm'); $start->setLabel('Starting Point*'); $start->setAttrib('autocomplete', 'off'); $start->addFilter('StripTags'); $start->addFilter('HtmlEntities'); $start->setAttrib('class', 'form-control'); $start->addFilter('StringTrim'); $start->setRequired(true)->addErrorMessage('Start Location Required'); // $start->addValidator('Regex', true, array('/^[a-zA-Z0-9.,:-\s]*$/'))->addErrorMessage('Invalid characters used'); // $start->addValidator('StringLength', true, array(0, 255))->addErrorMessage('Required Field'); $end = new Zend_Form_Element_Text('endForm'); $end->setLabel('Destination*'); $end->setAttrib('autocomplete', 'off'); $end->addFilter('StripTags'); $end->setAttrib('class', 'form-control'); $end->addFilter('HtmlEntities'); $end->addFilter('StringTrim'); $end->setRequired(true)->addErrorMessage('Destination Required'); // $end->addValidator('StringLength', true, array(0, 255))->addErrorMessage('Required Field'); $routeDate = new Zend_Form_Element_Text('routeDate'); $routeDate->setAttrib('autocomplete', 'off'); $routeDate->setAttrib('readonly', 'readonly'); $routeDate->setAttrib('maxlength', '10'); $routeDate->setAttrib('class', 'form-control'); $routeDate->setLabel('Date of Journey' . '*'); $routeDate->addFilter('StripTags'); $routeDate->addFilter('HtmlEntities'); $routeDate->addFilter('StringTrim'); $routeDate->setRequired(true)->addErrorMessage('Date Required'); $routeDate->addValidator('Regex', true, array('/^[0-9.\\s]*$/'))->addErrorMessage('Invalid characters used'); $routeDate->addValidator('StringLength', true, array(10, 10))->addErrorMessage('Required Field'); $passangers = new Zend_Form_Element_Select('passangers'); $passangers->setLabel('No of Passangers*'); $passangers->setAttrib('autocomplete', 'off'); $passangers->setAttrib('class', 'form-control'); $passangers->addFilter('StripTags'); $passangers->addFilter('HtmlEntities'); $passangers->addFilter('StringTrim'); $passangers->setRequired(true)->addErrorMessage('Password Required'); $passangers->setMultiOptions(array('1' => '1 Passanger', '2' => '2 Passangers', '3' => '3 Passangers', '4' => '4 Passangers', '5' => '5 Passangers', '6' => '6 Passangers')); $submit = new Zend_Form_Element_Submit('newRoute'); $submit->setLabel('New Route'); $submit->setAttrib('class', 'btn btn-info'); $submit->setAttrib('style', 'margin-top:20px'); $this->addElements(array($note, $intermed, $start, $end, $passangers, $routeDate, $submit)); $this->setElementDecorators(array('ViewHelper', 'Label', 'Errors')); $submit->setDecorators(array('ViewHelper')); $this->setDecorators(array('FormElements', 'Form', array('HtmlTag', array('tag' => 'div', 'id' => 'newRouteFormContainer')))); }
public function __construct($recurringBeginDate, $recurringClosedDate, $recurringMinAmount, $recurringMaxAmount, $app) { parent::__construct($recurringBeginDate, $recurringClosedDate, $recurringMinAmount, $recurringMaxAmount, $app); $startdate = new ZendX_JQuery_Form_Element_DatePicker('startdate'); $startdate->setAttrib('id', 'startdate'); $startdate->setAttrib('size', '8'); $startdate->setAttrib('class', ''); $startdate->setRequired(true)->addValidators(array(array('Date', true), array('Between', false, array($recurringBeginDate, $recurringClosedDate, 'messages' => array('notBetween' => 'date should be between ' . $recurringBeginDate . ' to (Closed date) ' . $recurringClosedDate))))); $recurringamount = new Zend_Form_Element_Text('recurringamount'); $recurringamount->setRequired(true)->addValidators(array(array('Digits'), array('GreaterThan', false, array($recurringMinAmount)), array('LessThan', false, array($recurringMaxAmount)), array('NotEmpty'))); $recurringamount->setAttrib('size', '8'); $recurringperiod = new Zend_Form_Element_Text('recurringperiod'); $recurringperiod->setAttrib('id', 'recurringperiod'); $recurringperiod->setAttrib('class', 'NormalBtn'); $memberfirstname = new Zend_Form_Element_MultiCheckbox('memberfirstname'); $memberfirstname->setAttrib('class', 'textfield'); $freequencyofdeposit = new Zend_Form_Element_Select('frequencyofdeposit'); $freequencyofdeposit->addMultiOption('', 'Select...'); $freequencyofdeposit->setAttrib('class', 'NormalBtn'); $freequencyofdeposit->setAttrib('id', 'freequencyofdeposit'); $perioddescription = new Zend_Form_Element_Select('perioddescription'); $perioddescription->addMultiOption('', 'Select..'); $perioddescription->setAttrib('class', 'NormalBtn'); $perioddescription->setAttrib('id', 'perioddescription'); $perioddescription->setRequired(true); $perioddescription->setAttrib('onchange', 'getInterests(this.value,"' . $app . '")'); $periodinterest = new Zend_Form_Element_Select('periodinterest'); $periodinterest->addMultiOption('', 'Select...'); $periodinterest->setAttrib('class', 'NormalBtn'); $periodinterest->setAttrib('id', 'periodinterest'); $periodinterest->setAttrib('size', '5'); $accountId = new Zend_Form_Element_Hidden('accountId'); $productIdss = new Zend_Form_Element_Hidden('productId'); $recurringindex = new Zend_Form_Element_Text('recurringinterest'); $recurringindex->setAttrib('id', 'recurringinterest'); $recurringindex->setAttrib('size', '8'); $recurringindex->setAttrib('class', 'NormalBtn'); $recurringindex->setAttrib('readonly', 'true'); $recurringindex->setAttrib('class', 'NormalBtn'); $recurringindex->setAttrib('readonly', 'true'); $memberTypeId = new Zend_Form_Element_Hidden('memberTypeId'); $memberId = new Zend_Form_Element_Hidden('member_id'); $productId = new Zend_Form_Element_Hidden('product_id'); $offerproductId = new Zend_Form_Element_Hidden('offerproduct_id'); $groupId = new Zend_Form_Element_Hidden('groupId'); $this->addElements(array($memberfirstname, $recurringindex, $freequencyofdeposit, $recurringperiod, $recurringamount, $startdate, $perioddescription, $periodinterest, $memberId, $productId, $offerproductId, $groupId, $memberTypeId, $accountId, $productIdss)); $period_id = new Zend_Form_Element_Hidden('period_id'); $period_id->setAttrib('id', 'period_id'); $startdate1 = new Zend_Form_Element_Hidden('startdate1'); $recurringamount1 = new Zend_Form_Element_Hidden('recurringamount1'); $perioddescription1 = new Zend_Form_Element_Hidden('perioddescription1'); $interest1 = new Zend_Form_Element_Hidden('interest1'); $Confirm = new Zend_Form_Element_Submit('Confirm'); $Confirm->setLabel('Confirm'); $Confirm->setAttrib('class', 'recurring'); $submit = new Zend_Form_Element_Submit('Submit'); $submit->setLabel('submit'); $submit->setAttrib('class', 'recurring'); $this->addElements(array($submit, $period_id, $Confirm, $startdate1, $recurringamount1, $perioddescription1, $interest1)); }
public function __construct($id, $subId) { parent::__construct($id, $subId); $formfield = new App_Form_Field(); $cropId = new Zend_Form_Element_Select('crop_id[]'); $cropId->setAttrib('class', 'txt_put'); $cropId->setAttrib('id', 'crop_id[]'); $season = new Zend_Form_Element_Select('season[]'); $season->setAttrib('class', 'txt_put'); $season->setAttrib('id', 'crop_id[]'); // $cropId = $formfield->field('Select','crop_id[]','','','','',true,'','','','','',0,0); $acre = $formfield->field('Text', 'acre[]', '', '', '', '', true, '', '', '', '', '', 0, 0); $acre->setAttrib('size', 8); $quantity = $formfield->field('Text', 'quantity[]', '', '', '', '', true, '', '', '', '', '', 0, 0); $quantity->setAttrib('size', 12); $marketed = $formfield->field('Text', 'marketed[]', '', '', '', '', true, '', '', '', '', '', 0, 0); $marketed->setAttrib('size', 12); $price = $formfield->field('Text', 'price[]', '', '', '', '', true, '', '', '', '', '', 0, 0); //hidden feilds $id = $formfield->field('Hidden', 'id[]', '', '', '', '', false, '', '', '', '', '', 0, $id); $subId = $formfield->field('Hidden', 'submodule_id[]', '', '', '', '', false, '', '', '', '', '', 0, $subId); $createdBy = $formfield->field('Hidden', 'created_by[]', '', '', '', '', false, '', '', '', '', '', 0, 1); $createdDate = $formfield->field('Hidden', 'created_date[]', '', '', '', '', false, '', '', '', '', '', 0, date("y/m/d H:i:s")); $crpid = $formfield->field('Hidden', 'crpid[]', '', '', '', '', '', '', '', '', '', '', 0, 0); $this->addElements(array($id, $cropId, $acre, $quantity, $marketed, $price, $subId, $createdBy, $createdDate, $crpid, $season)); }
public function __construct($path) { $fromglcode = new Zend_Form_Element_Select('fromglcode'); $fromglcode->addMultiOption('', 'Select' . '...'); $fromglcode->setAttrib('class', 'selectbutton'); // $fromglcode->setRequired(true) // ->addValidators(array(array('NotEmpty'))); $fromglcode->setAttrib('onchange', 'getglcode(this.value,"' . $path . '")'); $fromglsubcode = new Zend_Form_Element_Select('fromglsubcode'); $fromglsubcode->addMultiOption('', 'Select' . '...'); $fromglsubcode->setAttrib('class', 'selectbutton'); $toglcode = new Zend_Form_Element_Select('toglcode'); $toglcode->addMultiOption('', 'Select' . '...'); $toglcode->setAttrib('class', 'selectbutton'); $toglcode->setRequired(true)->addValidators(array(array('NotEmpty'))); $toglcode->setAttrib('onchange', 'gettoglcode(this.value,"' . $path . '")'); $toglsubcode = new Zend_Form_Element_Select('toglsubcode'); $toglsubcode->addMultiOption('', 'Select' . '...'); $toglsubcode->setAttrib('class', 'selectbutton'); $amount = new Zend_Form_Element_Text('amount'); $amount->setRequired(true)->addValidators(array(array('NotEmpty'))); $amount->setAttrib('class', 'txt_put'); $transactiondate = new Zend_Form_Element_Text('transactiondate'); $transactiondate->setRequired(true)->addValidators(array(array('NotEmpty'))); $transactiondate->setAttrib('class', 'txt_put'); $description = new Zend_Form_Element_Textarea('description'); $description->setAttrib('class', 'textfield'); $description->setAttrib('rows', '1'); $description->setAttrib('cols', '20'); $description->setAttrib('id', 'description'); $description->setRequired(true); $officeType = new Zend_Form_Element_Select('officeType'); $officeType->addMultiOption('', 'Select' . '...'); $officeType->setAttrib('class', 'selectbutton'); $officeType->setRequired(true)->addValidators(array(array('NotEmpty'))); $officeType->setAttrib('onchange', 'getBranch(this.value,"' . $path . '")'); $subOffice = new Zend_Form_Element_Select('subOffice'); $subOffice->addMultiOption('', 'Select' . '...'); $subOffice->setAttrib('class', 'selectbutton'); $paymenttype = new Zend_Form_Element_Select('paymenttype'); $paymenttype->addMultiOption('', 'select'); $paymenttype->setAttrib('class', 'NormalBtn'); $paymenttype->setAttrib('id', 'paymenttype'); $paymenttype->setAttrib('onchange', 'toggleField();'); $paymenttype->setRequired(true); $no = new Zend_Form_Element_Textarea('paymenttype_details'); $no->setAttrib('class', 'textfield'); $no->setAttrib('rows', '1'); $no->setAttrib('cols', '20'); $no->setAttrib('id', 'paymenttype_details'); $no->setAttrib('style', 'display:none;'); $no->setRequired(true); $submit = new Zend_Form_Element_Submit('Submit'); $submit->setAttrib('class', 'officesubmit'); $this->addElements(array($fromglcode, $fromglsubcode, $toglcode, $toglsubcode, $amount, $transactiondate, $description, $submit, $officeType, $subOffice, $paymenttype, $no)); }
public function __construct($options = null) { Zend_Dojo::enableForm($this); parent::__construct($options); $creditline_id = new Zend_Form_Element_Text('creditline_id'); $institution_id = new Zend_Form_Element_Text('institution_id'); $institutionName = new Zend_Form_Element_Select('institutionname'); $institutionName->setAttrib('class', 'txt_put'); $institutionName->setAttrib('id', 'institutionname'); $institutionName->setLabel('institutionname')->setRequired(true); $institutionName->addMultiOption('', 'Select...'); $institutionName->setAttrib('onchange', 'getState(this.value)'); $institutionNames = new Zend_Form_Element_Text('institutionnames'); $institutionNames->setAttrib('class', 'txt_put'); $institutionNames->setAttrib('readonly', 'true'); $instituteamount = new Zend_Form_Element_Text('instituteamount'); $instituteamount->setAttrib('class', 'txt_put'); $instituteamount->setAttrib('readonly', 'true'); $institutionamount = new Zend_Form_Element_Text('institutionamount'); $institutionamount->setAttrib('class', 'txt_put'); $institutionamount->setAttrib('readonly', 'true'); $maxcreditlinelimit = new Zend_Form_Element_Text('maxcreditlinelimit'); $maxcreditlinelimit->setAttrib('class', 'txt_put'); $maxcreditlinelimit->setAttrib('readonly', 'true'); $creditlinename = new Zend_Form_Element_Text('creditlinename'); $creditlinename->addValidator(new Zend_Validate_Db_NoRecordExists('ourbank_creditlineinformation', 'creditlinename')); $creditlinename->setAttrib('class', 'txt_put'); $creditlinename->setAttrib('id', 'creditlinename'); $creditlinename->setLabel('creditlinename')->setRequired(true)->addValidators(array(array('NotEmpty'))); $creditlineshortname = new Zend_Form_Element_Text('creditline_shortname'); $creditlineshortname->setAttrib('class', 'txt_put'); $creditlineshortname->setAttrib('id', 'creditline_shortname'); $creditlineshortname->setLabel('creditline_shortname')->setRequired(true)->addValidators(array('NotEmpty')); $creditlineamount = new Zend_Form_Element_Text('creditlineamount'); $creditlineamount->setAttrib('class', 'txt_put'); $creditlineamount->setAttrib('id', 'creditlineamount'); $creditlineamount->setRequired(true)->addValidators(array(array('NotEmpty'), array('Float'))); $creditlineinterest = new Zend_Form_Element_Text('creditlineinterest'); $creditlineinterest->setAttrib('class', 'txt_put'); $creditlineinterest->setAttrib('id', 'creditlineinterest'); $creditlineinterest->setRequired(true)->addValidators(array(array('NotEmpty'), array('stringLength', false, array(1, 3)), array('Digits'))); $creditlinefrom = new ZendX_JQuery_Form_Element_DatePicker('creditline_beginingdate'); $creditlinefrom->setJQueryParam('dateFormat', 'yy-mm-dd'); $creditlinefrom->setRequired(true)->addValidators(array(array('Date'))); $creditlinefrom->setAttrib('class', 'txt_put'); $creditlinefrom->setAttrib('id', 'creditline_beginingdate'); $creditlineto = new ZendX_JQuery_Form_Element_DatePicker('creditline_closingdate'); $creditlineto->setJQueryParam('dateFormat', 'yy-mm-dd'); $creditlineto->setRequired(true)->addValidators(array(array('Date'))); $creditlineto->setAttrib('class', 'txt_put'); $creditlineto->setAttrib('id', 'creditline_closingdate'); $submit = new Zend_Form_Element_Submit('Submit'); $submit->setAttrib('class', 'officesubmit'); $submit->setlabel('Submit'); $this->addElements(array($creditline_id, $institutionName, $creditlinename, $creditlineshortname, $creditlineamount, $creditlineinterest, $creditlinefrom, $creditlineto, $submit, $institutionamount, $instituteamount, $institutionNames, $institution_id, $maxcreditlinelimit)); }
public function init() { $languages = new Zend_Form_Element_Select('languages'); $languages->addMultiOption('', 'Select...'); $languages->setAttrib('class', 'txt_put'); $languages->setRequired(true)->addValidators(array(array('NotEmpty'))); $languages->setAttrib('onchange', 'getmember(this.value,"' . $app . '")'); $submit = new Zend_Form_Element_Submit('Submit'); $submit->removeDecorator('DtDdWrapper'); $this->addElements(array($languages, $submit)); }
public function init() { $this->setMethod('post'); $this->setAttrib('id', 'formid'); $this->setAttrib('name', 'managerleaverequest'); $id = new Zend_Form_Element_Hidden('id'); $appliedleavesdaycount = new Zend_Form_Element_Text('appliedleavesdaycount'); $appliedleavesdaycount->setAttrib('readonly', 'true'); $appliedleavesdaycount->setAttrib('onfocus', 'this.blur()'); $employeename = new Zend_Form_Element_Text('employeename'); $employeename->setAttrib('readonly', 'true'); $employeename->setAttrib('onfocus', 'this.blur()'); $managerstatus = new Zend_Form_Element_Select('managerstatus'); $managerstatus->setRegisterInArrayValidator(false); $managerstatus->setMultiOptions(array('1' => 'Approve', '2' => 'Reject')); $comments = new Zend_Form_Element_Textarea('comments'); $comments->setLabel("Comments"); $comments->setAttrib('rows', 10); $comments->setAttrib('cols', 50); $comments->setAttrib('maxlength', '200'); $leavetypeid = new Zend_Form_Element_Select('leavetypeid'); $leavetypeid->setAttrib('class', 'selectoption'); $leavetypeid->setRegisterInArrayValidator(false); $leavetypeid->setAttrib('readonly', 'true'); $leavetypeid->setAttrib('onfocus', 'this.blur()'); $leaveday = new Zend_Form_Element_Select('leaveday'); $leaveday->setRegisterInArrayValidator(false); $leaveday->setMultiOptions(array('1' => 'Full Day', '2' => 'Half Day')); $leaveday->setAttrib('readonly', 'true'); $leaveday->setAttrib('onfocus', 'this.blur()'); $from_date = new Zend_Form_Element_Text('from_date'); $from_date->setAttrib('readonly', 'true'); $from_date->setAttrib('onfocus', 'this.blur()'); $to_date = new Zend_Form_Element_Text('to_date'); $to_date->setAttrib('readonly', 'true'); $to_date->setAttrib('onfocus', 'this.blur()'); $reason = new Zend_Form_Element_Textarea('reason'); $reason->setAttrib('rows', 10); $reason->setAttrib('cols', 50); $reason->setAttrib('maxlength', '400'); $reason->setAttrib('readonly', 'true'); $reason->setAttrib('onfocus', 'this.blur()'); $leavestatus = new Zend_Form_Element_Text('leavestatus'); $leavestatus->setAttrib('readonly', 'true'); $leavestatus->setAttrib('onfocus', 'this.blur()'); $createddate = new Zend_Form_Element_Text('createddate'); $createddate->setAttrib('readonly', 'true'); $createddate->setAttrib('onfocus', 'this.blur()'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setAttrib('id', 'submitbutton'); $submit->setLabel('Save'); $this->addElements(array($id, $employeename, $managerstatus, $comments, $reason, $leaveday, $from_date, $to_date, $leavetypeid, $appliedleavesdaycount, $leavestatus, $createddate, $submit)); $this->setElementDecorators(array('ViewHelper')); }
public function init() { $this->setMethod('post'); $this->setAttrib('id', 'formid'); $this->setAttrib('name', 'emailsettings'); $id = new Zend_Form_Element_Hidden("id"); $id_val = Zend_Controller_Front::getInstance()->getRequest()->getParam('id', null); $username = new Zend_Form_Element_Text("username"); $username->setLabel("User name"); $username->setAttrib("class", "formDataElement"); // $username->setRequired("true"); $username->setAttrib('maxlength', '100'); //$username->addValidator('NotEmpty', false, array('messages' => 'Please enter username.')); $tls = new Zend_Form_Element_Text("tls"); $tls->setLabel("Secure Transport Layer"); $tls->setAttrib("class", "formDataElement"); // $tls->setRequired("true"); $tls->setAttrib('maxlength', '40'); // $tls->addValidator('NotEmpty', false, array('messages' => 'Please enter secure transport layer.')); $auth = new Zend_Form_Element_Select("auth"); $auth->setLabel("Authentication Type"); $auth->setMultiOptions(array('true' => 'True', 'false' => 'False')); $auth->setAttrib("class", "formDataElement"); $auth->setAttrib("onChange", "toggleAuth()"); $auth->setRequired("true"); $auth->setAttrib('maxlength', '50'); $auth->addValidator('NotEmpty', false, array('messages' => 'Please enter authentication type.')); $port = new Zend_Form_Element_Text("port"); $port->setLabel("Port"); $port->setAttrib("class", "formDataElement"); $port->setRequired("true"); $port->setAttrib('maxlength', '50'); $port->addValidator('NotEmpty', false, array('messages' => 'Please enter port.')); $password = new Zend_Form_Element_Text("password"); $password->setLabel("Password"); $password->setAttrib("class", "formDataElement"); // $password->setRequired("true"); $password->setAttrib('maxlength', '100'); // $password->addValidator('NotEmpty', false, array('messages' => 'Please enter password.')); $server_name = new Zend_Form_Element_Text("server_name"); $server_name->setLabel("SMTP Server"); $server_name->setAttrib("class", "formDataElement"); $server_name->setRequired("true"); $server_name->setAttrib('maxlength', '100'); $server_name->addValidator('NotEmpty', false, array('messages' => 'Please enter SMTP Server.')); $submit = new Zend_Form_Element_Submit("submit"); $submit->setLabel("Save"); $submit->setAttrib('id', 'submitbutton'); $submit->setAttrib("class", "formSubmitButton"); $this->addElements(array($id, $submit, $username, $tls, $auth, $port, $password, $server_name)); $this->setElementDecorators(array('ViewHelper')); }
public function __construct($haveToPay, $currentdate, $fromDate) { parent::__construct($haveToPay, $currentdate, $fromDate); $accountId = new Zend_Form_Element_Hidden('accountcode'); $installment_status = new Zend_Form_Element_Hidden('installment_status'); $memberId = new Zend_Form_Element_Hidden('membercode'); $amount = new Zend_Form_Element_Text('amount'); $amount->setRequired(true)->addValidators(array(array('Float'), array('GreaterThan', false, array($haveToPay - 0.0001, 'messages' => array('notGreaterThan' => 'Min=' . $haveToPay))))); $amount->setAttrib('class', 'txt_put'); $amount->setAttrib('id', 'amount'); $loanInterestAmountPaied = new Zend_Form_Element_Text('loanInterestAmountPaied'); $loanInterestAmountPaied->setAttrib('class', 'textfieldreadonly'); $loanInterestAmountPaied->setAttrib('readonly', 'true'); $loanInterestAmountPaied->setAttrib('id', 'loanInterestAmountPaied'); $loanRepaymentDate = new Zend_Form_Element_Text('loanRepaymentDate'); $loanRepaymentDate->setAttrib('id', 'loanRepaymentDate'); $loanRepaymentDate->setAttrib('size', '8'); $loanRepaymentDate->setAttrib('class', 'txt_put'); $loanRepaymentDate->setRequired(true)->addValidators(array(array('Date', true), array('Between', false, array($fromDate, $currentdate, 'messages' => array('notBetween' => 'date should be between ' . $fromDate . ' to (today date) ' . $currentdate))))); $transactionMode = new Zend_Form_Element_Select('transactionMode'); $transactionMode->addMultiOption('', 'select'); $transactionMode->setAttrib('class', 'selectbutton'); $transactionMode->setAttrib('onchange', 'toggleField();'); $transactionMode->setAttrib('id', 'paymenttype'); $transactionMode->setRequired(true); $transactionModeDetails = new Zend_Form_Element_Textarea('paymenttype_details'); $transactionModeDetails->setAttrib('class', 'txt_put'); $transactionModeDetails->setAttrib('id', 'paymenttype_details'); $transactionModeDetails->setAttrib('style', 'display:none'); $transactionModeDetails->setAttrib('rows', '1'); $transactionModeDetails->setAttrib('cols', '20'); $transactionModeDetails->setRequired(true); $pay = new Zend_Form_Element_Submit('pay'); $pay->setAttrib('class', 'officesubmit'); $pay->setAttrib('onclick', 'getState(this.value)'); $pay->setLabel('pay'); $back = new Zend_Form_Element_Submit('back'); $back->setAttrib('class', 'officesubmit'); $confirm = new Zend_Form_Element_Submit('confirm'); $confirm->setAttrib('class', 'officesubmit'); $confirm->setAttrib('onclick', 'getState(this.value)'); $confirm->setLabel('confirm'); $categoryId = new Zend_Form_Element_Hidden('categoryId'); $categoryId->setAttrib('class', 'txt_put'); $amount1 = new Zend_Form_Element_Hidden('repayableamounts1'); $loanRepaymentDate1 = new Zend_Form_Element_Hidden('loanRepaymentDate1'); $transactionMode1 = new Zend_Form_Element_Hidden('transactionMode1'); $paymenttype_details1 = new Zend_Form_Element_Hidden('paymenttype_details1'); $fine1 = new Zend_Form_Element_Hidden('fine1'); $this->addElements(array($accountId, $amount, $loanRepaymentDate, $pay, $memberId, $loanInterestAmountPaied, $transactionMode, $transactionModeDetails, $categoryId, $installment_status, $confirm, $amount1, $loanRepaymentDate1, $transactionMode1, $paymenttype_details1, $fine1, $back)); }
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')); }
public function init() { $this->setMethod('post'); $this->setAttrib('id', 'formid'); $this->setAttrib('name', 'systempreference'); $id = new Zend_Form_Element_Hidden('id'); $dateformatid = new Zend_Form_Element_Select('dateformatid'); $dateformatid->setAttrib('class', 'selectoption'); $dateformatid->setRegisterInArrayValidator(false); $dateformatid->setRequired(true); $dateformatid->addValidator('NotEmpty', false, array('messages' => 'Please select date format.')); $timeformatid = new Zend_Form_Element_Select('timeformatid'); $timeformatid->setAttrib('class', 'selectoption'); $timeformatid->setRegisterInArrayValidator(false); $timeformatid->setRequired(true); $timeformatid->addValidator('NotEmpty', false, array('messages' => 'Please select time format.')); $timezoneid = new Zend_Form_Element_Select('timezoneid'); $timezoneid->setAttrib('class', 'selectoption'); $timezoneid->setRegisterInArrayValidator(false); $timezoneid->setRequired(true); $timezoneid->addValidator('NotEmpty', false, array('messages' => 'Please select time zone preference.')); $timezoneid->addMultiOption('', 'Select Time zone'); $timezoneModal = new Default_Model_Timezone(); $timezoneData = $timezoneModal->fetchAll('isactive=1', 'timezone')->toArray(); foreach ($timezoneData as $data) { $timezoneid->addMultiOption($data['id'], $data['timezone'] . ' [' . $data['timezone_abbr'] . ']'); } $currencyid = new Zend_Form_Element_Select('currencyid'); $currencyid->setAttrib('class', 'selectoption'); $currencyid->setRegisterInArrayValidator(false); $currencyid->setRequired(true); $currencyid->addValidator('NotEmpty', false, array('messages' => 'Please select currency.')); $passwordid = new Zend_Form_Element_Select('passwordid'); $passwordid->setAttrib('class', 'selectoption'); $passwordid->setAttrib('onchange', 'displayPasswordDesc(this)'); $passwordid->setRegisterInArrayValidator(false); $passwordid->setRequired(true); $passwordid->addValidator('NotEmpty', false, array('messages' => 'Please select default password.')); $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($timezoneid, $id, $dateformatid, $timeformatid, $currencyid, $passwordid, $description, $submit)); $this->setElementDecorators(array('ViewHelper')); }
public function __construct($path, $minumumbal, $maximumbal) { parent::__construct($path, $minumumbal); $date1 = new ZendX_JQuery_Form_Element_DatePicker('date1'); $date1->setAttrib('class', 'txt_put'); $date1->setAttrib('autocomplete', 'off'); $date1->setJQueryParam('dateFormat', 'yy-mm-dd'); $date1->setRequired(true); $period = new Zend_Form_Element_Select('period'); $period->addMultiOption('', 'Select...'); $period->setAttrib('class', 'txt_put'); $period->setRequired(true); $period->setAttrib('onchange', 'getInterests("' . $path . '",this.value)'); $interest = new Zend_Form_Element_Text('interest'); $interest->setAttrib('class', 'txt_put'); // $interest->setAttrib('readonly', 'true'); $tAmount = new Zend_Form_Element_Text('tAmount'); $tAmount->setAttrib('class', 'txt_put'); $tAmount->setAttrib('onchange', 'calculateMatureAmount()'); $valid = new Zend_Validate_Between(array('min' => $minumumbal, 'max' => $maximumbal)); $tAmount->addValidators(array(array($valid, true))); $matureamount = new Zend_Form_Element_Text('matureamount'); $matureamount->setAttrib('class', 'txt_put'); $amount = new Zend_Form_Element_Text('amount'); $amount->setAttrib('class', 'txt_put'); // $amount->setRequired(true); $amount->setAttrib('onchange', 'calculateTotalAmount(this.value),calculateMatureAmount()'); $memberfirstname = new Zend_Form_Element_MultiCheckbox('memberfirstname'); $memberfirstname->setAttrib('class', 'textfield'); // $memberfirstname->setRequired(true); $fixedfee = new Zend_Form_Element_Text('fixedfee'); $fixedfee->setAttrib('class', 'txt_put'); $fixedfee->setAttrib('readonly', 'true'); $totalamount = new Zend_Form_Element_Text('totalamount'); $totalamount->setAttrib('class', 'txt_put'); $totalamount->setAttrib('readonly', 'true'); $memberId = new Zend_Form_Element_Hidden('memberId'); $productId = new Zend_Form_Element_Hidden('Id'); $membercode = new Zend_Form_Element_Hidden('code'); $typeId = new Zend_Form_Element_Hidden('typeId'); $Type = new Zend_Form_Element_Hidden('Type'); $memberTypeIdv = new Zend_Form_Element_Hidden('memberTypeIdv'); $submit = new Zend_Form_Element_Submit('Submit'); $submit->setRequired(false); $Yes = new Zend_Form_Element_Submit('Yes'); $back = new Zend_Form_Element_Submit('Back'); $this->addElements(array($submit, $amount, $period, $matureamount, $interest, $tAmount, $memberfirstname, $fixedfee, $memberId, $membercode, $totalamount, $Type, $date1, $productId, $typeId, $memberTypeIdv, $Yes, $back)); }
public function startFrom() { $setting = $this->setting; if (Application_Model_Preference::GetPlanLevel() == 'disabled') { $output_sound_device = new Zend_Form_Element_Checkbox('output_sound_device'); $output_sound_device->setLabel('Hardware Audio Output')->setRequired(false)->setValue($setting['output_sound_device'] == "true" ? 1 : 0)->setDecorators(array('ViewHelper')); if (Application_Model_Preference::GetEnableStreamConf() == "false") { $output_sound_device->setAttrib("readonly", true); } $this->addElement($output_sound_device); $output_types = array("ALSA" => "ALSA", "AO" => "AO", "OSS" => "OSS", "Portaudio" => "Portaudio", "Pulseaudio" => "Pulseaudio"); $output_type = new Zend_Form_Element_Select('output_sound_device_type'); $output_type->setLabel("Output Type")->setMultiOptions($output_types)->setValue($setting['output_sound_device_type'])->setDecorators(array('ViewHelper')); if ($setting['output_sound_device'] != "true") { $output_type->setAttrib("disabled", "disabled"); } $this->addElement($output_type); } $icecast_vorbis_metadata = new Zend_Form_Element_Checkbox('icecast_vorbis_metadata'); $icecast_vorbis_metadata->setLabel('Icecast Vorbis Metadata')->setRequired(false)->setValue($setting['icecast_vorbis_metadata'] == "true" ? 1 : 0)->setDecorators(array('ViewHelper')); if (Application_Model_Preference::GetEnableStreamConf() == "false") { $icecast_vorbis_metadata->setAttrib("readonly", true); } $this->addElement($icecast_vorbis_metadata); $stream_format = new Zend_Form_Element_Radio('streamFormat'); $stream_format->setLabel('Stream Label:'); $stream_format->setMultiOptions(array("Artist - Title", "Show - Artist - Title", "Station name - Show name")); $stream_format->setValue(Application_Model_Preference::GetStreamLabelFormat()); $stream_format->setDecorators(array('ViewHelper')); $this->addElement($stream_format); }
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')); }
public function init() { $this->setDecorators(array(array('ViewScript', array('viewScript' => 'form/add-show-rebroadcast.phtml')))); $relativeDates = array(); $relativeDates[""] = ""; for ($i = 0; $i <= 30; $i++) { $relativeDates["{$i} days"] = "+{$i} " . _("days"); } for ($i = 1; $i <= 10; $i++) { $select = new Zend_Form_Element_Select("add_show_rebroadcast_date_{$i}"); $select->setAttrib('class', 'input_select'); $select->setMultiOptions($relativeDates); $select->setRequired(false); $select->setDecorators(array('ViewHelper')); $this->addElement($select); $text = new Zend_Form_Element_Text("add_show_rebroadcast_time_{$i}"); $text->setAttrib('class', 'input_text'); $text->addFilter('StringTrim'); $text->addValidator('date', false, array('HH:mm')); $text->addValidator('regex', false, array('/^[0-2]?[0-9]:[0-5][0-9]$/', 'messages' => _('Invalid character entered'))); $text->setRequired(false); $text->setDecorators(array('ViewHelper')); $this->addElement($text); } }
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')); }
public function __construct($options = null) { parent::__construct(); $this->setName('layout_form'); $this->addElementPrefixPath('Oibs_Decorators', 'Oibs/Decorators/', 'decorator'); $this->removeDecorator('Errors'); $this->removeDecorator('HtmlTag'); $this->removeDecorator('Label'); //$this->setAction($this->_generateActionUrl()); $layout_select = new Zend_Form_Element_Select('layout_select'); $layout_select->setAttrib('onchange', '$("#submitLayoutSelection").click();'); $layout_select->removeDecorator('Errors'); $layout_select->removeDecorator('Label'); $layout_select->removeDecorator('HtmlTag'); /*foreach($options as $language) $translation_select->addMultiOption($language['iso6391_lng'], $language['name_lng']); */ $layout_select->addMultiOption('default', 'Default'); $layout_select->addMultiOption('custom', 'Custom'); //$layout_select->setValue($this->_getCurrentLayoutSelect()); $layout_select->setValue('default'); $submit = new Zend_Form_Element_Submit('submitLayoutSelection'); $submit->removeDecorator('DtDdWrapper'); $submit->setAttrib('style', 'display: none;'); $this->addElements(array($layout_select, $submit)); }
public function __construct($options = null) { Zend_Dojo::enableForm($this); parent::__construct($options); $category_id = new Zend_Form_Element_Select('category_id'); $category_id->addMultiOption('', 'Select...'); $category_id->setAttrib('class', 'txt_put')->setLabel('Category Name'); $category_id->setRequired(true)->addValidators(array(array('NotEmpty')))->setDecorators(array('ViewHelper', array('Description', array('tag' => '', 'escape' => false)), 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr')))); $productname = new Zend_Form_Element_Text('productname'); $productname->addValidator(new Zend_Validate_Db_NoRecordExists('ourbank_productdetails', 'productname')); $productname->setAttrib('class', 'txt_put')->setLabel('Product Name'); $productname->setRequired(true)->addValidators(array(array('NotEmpty')))->setDecorators(array('ViewHelper', array('Description', array('tag' => '', 'escape' => false)), 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr')))); $product_id = new Zend_Form_Element_Hidden('product_id'); $product_id->setAttrib('class', 'txt_put'); $productshortname = new Zend_Form_Element_Text('productshortname'); $productshortname->setAttrib('class', 'txt_put')->setLabel('Product Short Name'); $productshortname->setRequired(true)->addValidators(array(array('NotEmpty')))->setDecorators(array('ViewHelper', array('Description', array('tag' => '', 'escape' => false)), 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr')))); $product_description = new Zend_Form_Element_Textarea('product_description', array('rows' => 3, 'cols' => 20)); $product_description->setAttrib('class', '')->setLabel('Productdescription'); $product_description->setRequired(true)->addValidators(array(array('NotEmpty')))->setDecorators(array('ViewHelper', array('Description', array('tag' => '', 'escape' => false)), 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td')), array('Label', array('tag' => 'td')), array(array('row' => 'HtmlTag'), array('tag' => 'tr')))); $submit = new Zend_Form_Element_Submit('Submit'); $submit->setAttrib('id', 'save')->setDecorators(array('ViewHelper', array('Description', array('tag' => '', 'escape' => false)), 'Errors', array(array('data' => 'HtmlTag'), array('colspan' => '8 ')), array(array('data' => 'HtmlTag'), array('tag' => 'td ', 'colspan' => '8')), array(array('row' => 'HtmlTag'), array('tag' => 'tr')))); $this->addElements(array($category_id, $productname, $productshortname, $product_description, $product_id, $submit)); $this->setDecorators(array('FormElements', array(array('data' => 'HtmlTag'), array('tag' => 'table', 'id' => 'hor-minimalist-b')), 'Form')); }
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')); }
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')); }
public function __construct($options = null) { parent::__construct($options); parent::__construct(); $account_id = new Zend_Form_Element_Hidden('accountId'); $product_id = new Zend_Form_Element_Hidden('productId'); $newStatus = new Zend_Form_Element_Select('newStatus'); $newStatus->setAttrib('class', 'NormalBtn'); $newStatus->setRequired(true); $newStatus->addMultiOption('', 'Select...'); $description = new Zend_Form_Element_Textarea('description'); $description->setAttrib('class', 'textfield'); $description->setAttrib('rows', '2'); $description->setAttrib('cols', '20'); $description->setRequired(true); $newStatus1 = new Zend_Form_Element_Hidden('newStatus1'); $description1 = new Zend_Form_Element_Hidden('description1'); $submit = new Zend_Form_Element_Submit('Submit'); $submit->setLabel('submit'); $submit->setAttrib('class', 'recurring'); $Confirm = new Zend_Form_Element_Submit('Confirm'); $Confirm->setLabel('Confirm'); $Confirm->setAttrib('class', 'recurring'); $this->addElements(array($submit, $description, $newStatus, $account_id, $product_id, $Confirm, $newStatus1, $description1)); }
public function init() { $this->setName('destinatario')->setAttrib('class', 'form-horizontal'); $des_id_destinatario = new Zend_Form_Element_Hidden('des_id_destinatario'); $des_id_destinatario->addFilter('Int'); $des_nombre = new Zend_Form_Element_Text('des_nombre'); $des_nombre->setAttrib('placeholder', 'Nombre')->setLabel('Nombre:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty'); $des_rut = new Zend_Form_Element_Text('des_rut'); $des_rut->setAttrib('placeholder', 'RUT')->setLabel('RUT:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty'); $des_direccion = new Zend_Form_Element_Text('des_direccion'); $des_direccion->setAttrib('placeholder', 'Dirección')->setLabel('Dirección:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty'); $des_ciudad = new Zend_Form_Element_Text('des_ciudad'); $des_ciudad->setAttrib('placeholder', 'Ciudad')->setLabel('Ciudad:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty'); $des_telefono = new Zend_Form_Element_Text('des_telefono'); $des_telefono->setAttrib('placeholder', 'Teléfono')->setLabel('Teléfono:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty'); $des_tipo = new Zend_Form_Element_Select('des_tipo'); $des_tipo->setAttrib('placeholder', 'Tipo')->setLabel('Tipo:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty'); $des_tipo->addMultiOption("CLIENTE", "Cliente"); $des_tipo->addMultiOption("PROVEEDOR", "Proveedor"); $des_tipo->addMultiOption("INTERNO", "Tienda SMO (Interno)"); $des_comuna = new Zend_Form_Element_Text('des_comuna'); $des_comuna->setAttrib('placeholder', 'Comuna')->setLabel('Comuna:')->addFilter('StripTags')->addFilter('StringTrim'); $des_region = new Zend_Form_Element_Text('des_region'); $des_region->setAttrib('placeholder', 'Región')->setLabel('Región:')->addFilter('StripTags')->addFilter('StringTrim'); $des_contacto = new Zend_Form_Element_Text('des_contacto'); $des_contacto->setAttrib('placeholder', 'Contacto')->setLabel('Contacto:')->addFilter('StripTags')->addFilter('StringTrim'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setAttrib('id', 'submitbutton'); $this->addElements(array($des_id_destinatario, $des_nombre, $des_rut, $des_direccion, $des_ciudad, $des_telefono, $des_tipo, $des_comuna, $des_region, $des_contacto, $submit)); }