本文整理汇总了PHP中App_Form_Field::field方法的典型用法代码示例。如果您正苦于以下问题:PHP App_Form_Field::field方法的具体用法?PHP App_Form_Field::field怎么用?PHP App_Form_Field::field使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类App_Form_Field
的用法示例。
在下文中一共展示了App_Form_Field::field方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($accNum)
{
parent::__construct($accNum);
$date = new ZendX_JQuery_Form_Element_DatePicker('date');
$date->setAttrib('class', 'txt_put');
$date->setJQueryParam('dateFormat', 'yy-mm-dd');
$date->setRequired(true);
$date->setAttrib('size', 12);
$date1 = new ZendX_JQuery_Form_Element_DatePicker('date1');
$date1->setAttrib('class', 'txt_put');
$date1->setJQueryParam('dateFormat', 'yy-mm-dd');
$date1->setRequired(true);
$date1->setAttrib('size', 12);
//$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$rows,$cols,$decorator,$value
$formfield = new App_Form_Field();
$amount = $formfield->field('Text', 'amount', '', '', 'txt_put', '', true, '', '', '', '', '', 0, '');
$graterthan = new Zend_Validate_GreaterThan(0);
$amount->setRequired(true)->addValidators(array(array('NotEmpty'), array('Float'), array($graterthan, true)));
$amount->setAttrib('size', 12);
$description = $formfield->field('Textarea', 'description', '', '', 'txt_put', '', true, '', '', '', 2, 15, '', 0, '');
$transactionMode = $formfield->field('Select', 'transactionMode', '', '', 'txt_put', '', true, '', '', '', '', '', 0, '');
// hidden feilds
$accNum = $formfield->field('Hidden', 'accNum', '', '', 'txt_put', '', true, '', '', '', '', '', 0, $accNum);
$sms = new Zend_Form_Element_Checkbox('sms');
$back = new Zend_Form_Element_Submit('Back');
$submit = new Zend_Form_Element_Submit('Submit');
$this->addElements(array($date, $amount, $transactionMode, $description, $submit, $accNum, $back, $sms, $date1));
}
示例2: __construct
public function __construct($loanamount)
{
Zend_Dojo::enableForm($this);
parent::__construct($loanamount);
//$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$rows,$cols,$decorator,$value
$formfield = new App_Form_Field();
$date = new ZendX_JQuery_Form_Element_DatePicker('date');
$date->setAttrib('class', 'txt_put');
$date->setJQueryParam('dateFormat', 'yy-mm-dd');
$date->setRequired(true);
$Amount = new Zend_Form_Element_Text('Amount');
$Amount->setAttrib('class', 'textfield');
$lessthan = new Zend_Validate_LessThan(array('max' => $loanamount + 1, 'inclusive' => false));
$Amount->setRequired(true)->addValidators(array(array('NotEmpty'), array('Float'), array($lessthan, true)));
$transactionMode = $formfield->field('Select', 'transactionMode', '', '', 'tmode', '', true, '', '', '', '', '', 0, '');
$etransfer = $formfield->field('Select', 'etransfer', '', '', 'etran', '', false, '', '', '', '', '', 0, '');
$etransfer->setRegisterInArrayValidator(false);
$memberid = $formfield->field('Hidden', 'memberid', '', '', 'memberclass', '', false, '', '', '', '', '', 0, '');
$membertypeid = $formfield->field('Hidden', 'membertypeid', '', '', 'membertypeclass', '', false, '', '', '', '', '', 0, '');
$pathhidden = $formfield->field('Hidden', 'pathhidden', '', '', 'pathclass', '', false, '', '', '', '', '', 0, '');
$othrtext = new Zend_Form_Element_Text('othertext');
$othrtext->setAttrib('size', 12);
$description = new Zend_Form_Element_Textarea('description');
$description->setAttrib('rows', '2');
$description->setAttrib('cols', '20');
$description->setRequired(true);
$sms = new Zend_Form_Element_Checkbox('sms');
$back = new Zend_Form_Element_Submit('Back');
$back->setAttrib('id', 'button2');
$submit = new Zend_Form_Element_Submit('Submit');
$submit->setAttrib('id', 'button');
$this->addElements(array($date, $Amount, $transactionMode, $etransfer, $othrtext, $description, $sms, $memberid, $pathhidden, $membertypeid, $submit, $back));
}
示例3: __construct
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));
$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));
$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', 'fetchoffice(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, $meeting_place, $institute_bank_id, $group_name, $meeting_day, $Back, $hiddenId, $submit));
}
示例4: init
public function init()
{
$formfield = new App_Form_Field();
$search_meeting_name_att = $formfield->field('Select', 'search_meeting_name_att', '', '', '', '', '', '', '', '', '', '', '', '');
$search_meeting_date = $formfield->field('Text', 'search_meeting_date', '', '', '', '', '', '', '', '', '', '', '', '');
$search_meeting_date->setAttrib('autocomplete', 'off');
$this->addElements(array($search_meeting_name_att, $search_meeting_date));
}
示例5: init
public function init()
{
//$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$rows,$cols,$decorator,$value
$formfield = new App_Form_Field();
$membercode = $formfield->field('Text', 'membercode', '', '', 'mand', '', true, '', '', '', '', '', 0, 0);
$submit = $formfield->field('Submit', 'Submit', '', '', '', '', false, '', '', '', '', '', 0, 0);
$this->addElements(array($membercode, $submit));
}
示例6: init
public function init()
{
//$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$rows,$cols,$decorator,$value
$formfield = new App_Form_Field();
$groupcode = $formfield->field('Text', 'groupcode', '', '', 'mand', '', true, '', '', '', '', '', 0, 0);
$groupcode->addValidator('digits')->addErrorMessage('Enter Numeric data');
$submit = $formfield->field('Submit', 'Submit', '', '', '', '', false, '', '', '', '', '', 1, 0);
$this->addElements(array($groupcode, $submit));
}
示例7: init
public function init()
{
$formfield = new App_Form_Field();
$search_weekdays = $formfield->field('Select', 'search_weekdays', '', '', '', '', '', '', '', '', '', '', '', '');
$search_meeting_name = $formfield->field('Text', 'search_meeting_name', '', '', '', '', '', '', '', '', '', '', '', '');
$search_meeting_place = $formfield->field('Text', 'search_meeting_place', '', '', '', '', '', '', '', '', '', '', '', '');
$search_group_name = $formfield->field('Text', 'search_group_name', '', '', '', '', '', '', '', '', '', '', '', '');
$this->addElements(array($search_weekdays, $search_meeting_name, $search_meeting_place, $search_group_name));
}
示例8: __construct
public function __construct()
{
parent::__construct();
// $fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$rows,$cols,$decorator,$value
$formfield = new App_Form_Field();
$remarks = $formfield->field('Textarea', 'remarks', '', '', 'mand required', '', true, '', '', '', 3, 18, '', '');
$id = $formfield->field('Hidden', 'id', '', '', '', '', false, '', '', '', '', '', 0, 0);
$this->addElements(array($remarks, $id));
}
示例9: init
public function init()
{
$vtype = array('Alpha', 'StringLength');
$formfield = new App_Form_Field();
// $fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$rows,$cols,$decorator,$value
$feename = $formfield->field('Text', 'name', '', '', 'mand', '', false, '', '', '', '', '', 0, 0);
$value = $formfield->field('Text', 'value', '', '', 'mand', '', false, '', '', '', '', '', 0, 0);
// Hidden Feilds
$this->addElements(array($feename, $value));
}
示例10: __construct
public function __construct()
{
parent::__construct();
//$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$decorator,$value
$formfield = new App_Form_Field();
// send parameters to get input fields
$groupcode = $formfield->field('Text', 'groupcode', '', '', '', 'Group code', false, '', '', '', '', '', 1, '');
$groupname = $formfield->field('Text', 'groupname', '', '', '', 'Group name', false, '', '', '', '', '', 1, '');
$this->addElements(array($groupcode, $groupname));
}
示例11: __construct
public function __construct($id, $subId)
{
parent::__construct($id);
//record id
parent::__construct($subId);
//module id
//create a contact details form elements
$vtype = array('Digits');
$formfield = new App_Form_Field();
$contactPerson = $formfield->field('Text', 'contact_person', '', '', 'mand', 'Contact person', true, '', '', '', '', '', 1, 0);
$contactPerson->setAttrib('maxlength', 30);
$telephone = $formfield->field('Text', 'telephone', '', '', 'mand', 'Telephone number', true, $vtype, '', '', '', '', 1, 0);
$telephone->setAttrib('maxlength', 12);
$mobile = $formfield->field('Text', 'mobile', '', '', 'mand', 'mobile', true, $vtype, 1, 15, '', '', 1, 0);
$mobile->setAttrib('maxlength', 10);
$email = $formfield->field('Text', 'email', '', '', 'mand', 'Email', true, '', '', '', '', '', 1, 0);
$email->addValidator('EmailAddress');
$email->addErrorMessage('Enter valid email address');
//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"));
$recordstatusId = $formfield->field('Hidden', 'recordstatus_id', '', '', '', '', false, '', '', '', '', '', 0, 3);
$this->addElements(array($id, $contactPerson, $telephone, $mobile, $email, $subId, $createdBy, $createdDate));
}
示例12: __construct
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));
}
示例13: init
public function init()
{
//$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$rows,$cols,$decorator,$value
$formfield = new App_Form_Field();
$purpose = $formfield->field('Select', 'purpose', '', '', 'mand', '', true, '', '', '', '', '', 0, 0);
$amtrequired = $formfield->field('Text', 'amount', '', '', '', '', false, '', '', '', '', '', 0, 0);
$period = $formfield->field('Text', 'period', '', '', '', '', false, '', '', '', '', '', 0, 0);
$duration = $formfield->field('Text', 'duration', '', '', '', '', false, '', '', '', '', '', 0, 0);
$submit = $formfield->field('Submit', 'submit', '', '', '', '', false, '', '', '', '', '', 0, 0);
$this->addElements(array($purpose, $amtrequired, $period, $duration, $submit));
}
示例14: __construct
public function __construct()
{
parent::__construct();
$formfield = new App_Form_Field();
$membername = $formfield->field('Text', 'membername', '', '', '', '', false, '', '', '', '', '', 0, 0);
$membername->setAttrib('size', 12);
$village = $formfield->field('Select', 'village', '', '', '', '', false, '', '', '', '', '', 0, 0);
$regional = $formfield->field('Text', 'name_inregional', '', '', '', '', false, '', '', '', '', '', 0, 0);
$regional->setAttrib('size', 12);
$this->addElements(array($membername, $village, $regional));
}
示例15: __construct
public function __construct($app)
{
$vtype = array('Alpha', 'StringLength');
$formfield = new App_Form_Field();
parent::__construct($app);
//$fieldtype,$fieldname,$table,$columnname,$cssname,$labelname,$required,$validationtype,$min,$max,$rows,$cols,$decorator,$value
$officebranch = $formfield->field('Select', 'bank_id', '', '', 'mand', '', false, '', '', '', '', '', 0, 0);
$officebranch->setAttrib('onchange', 'Getofficer(this.value,"' . $app . '")');
$loanofficer = $formfield->field('Select', 'loanofficer', '', '', 'mand', '', false, '', '', '', '', '', 0, 0);
$date = $formfield->field('Text', 'datefrom', '', '', 'mand', '', true, '', '', '', '', '', 0, 0);
$this->addElements(array($loanofficer, $officebranch, $date));
}