本文整理汇总了PHP中Zend_Form_Element_Submit::setLabel方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Submit::setLabel方法的具体用法?PHP Zend_Form_Element_Submit::setLabel怎么用?PHP Zend_Form_Element_Submit::setLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form_Element_Submit
的用法示例。
在下文中一共展示了Zend_Form_Element_Submit::setLabel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
$this->setMethod('post');
$this->setAttrib('id', 'formid');
$this->setAttrib('name', 'holidaygroups');
$id = new Zend_Form_Element_Hidden('id');
$holidayname = new Zend_Form_Element_Text('holidayname');
$holidayname->setAttrib('maxLength', 20);
$holidayname->addFilter(new Zend_Filter_StringTrim());
$holidayname->setRequired(true);
$holidayname->addValidator('NotEmpty', false, array('messages' => 'Please enter holiday.'));
$holidayname->addValidator("regex", true, array('pattern' => '/^[a-zA-Z0-9.\\- ?]+$/', 'messages' => array('regexNotMatch' => 'Please enter valid holiday.')));
$groupid = new Zend_Form_Element_Multiselect('groupid');
$groupid->setAttrib('class', 'selectoption');
$groupid->setRegisterInArrayValidator(false);
$groupid->setRequired(true);
$groupid->addValidator('NotEmpty', false, array('messages' => 'Please select holiday group.'));
$holiday_date = new ZendX_JQuery_Form_Element_DatePicker('holidaydate');
$holiday_date->setAttrib('readonly', 'true');
$holiday_date->setAttrib('onfocus', 'this.blur()');
$holiday_date->setOptions(array('class' => 'brdr_none'));
$holiday_date->setRequired(true);
$holiday_date->addValidator('NotEmpty', false, array('messages' => 'Please select date.'));
$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, $holidayname, $groupid, $holiday_date, $description, $submit));
$this->setElementDecorators(array('ViewHelper'));
$this->setElementDecorators(array('UiWidgetElement'), array('holidaydate'));
}
示例2: createButtons
protected function createButtons()
{
$this->submit = new Zend_Form_Element_Submit(self::BUTTON_SUBMIT);
$this->submit->setLabel($this->submitName)->setAttrib('class', self::BUTTON_SUBMIT)->setIgnore(true);
$this->cancel = new Zend_Form_Element_Submit(self::BUTTON_CANCEL);
$this->cancel->setLabel('Cancel')->setAttrib('class', self::BUTTON_SUBMIT . ' ' . self::BUTTON_CANCEL)->setIgnore(true);
}
示例3: init
public function init()
{
$this->setMethod('post');
$this->setAttrib('action', BASE_URL . 'timeformat/edit');
$this->setAttrib('id', 'formid');
$this->setAttrib('name', 'timeformat');
$id = new Zend_Form_Element_Hidden('id');
$timeformat = new Zend_Form_Element_Text('timeformat');
$timeformat->setAttrib('maxLength', 20);
$timeformat->addFilter(new Zend_Filter_StringTrim());
$timeformat->setRequired(true);
$timeformat->addValidator('NotEmpty', false, array('messages' => 'Please enter time format.'));
$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 = "'timeformat/saveupdate/format/json'";
$dialogMsg = "''";
$toggleDivId = "''";
$jsFunction = "'redirecttocontroller(\\'timeformat\\');'";
$this->addElements(array($id, $timeformat, $description, $submit));
$this->setElementDecorators(array('ViewHelper'));
}
示例4: __construct
public function __construct($options = null)
{
parent::__construct($options);
$this->setAttrib('enctype', 'multipart/form-data');
$this->setName('AddRulerImage');
$decorators = array(array('ViewHelper'), array('Description', array('placement' => 'append', 'class' => 'info')), array('Errors', array('placement' => 'append', 'class' => 'error', 'tag' => 'li')), array('Label'), array('HtmlTag', array('tag' => 'li')));
$image = new Zend_Form_Element_File('image');
$image->setLabel('Upload an image: ')->setRequired(true)->setDestination('./images/rulers/')->addValidator('Size', false, 2097152)->addValidator('Extension', false, 'jpeg,tif,jpg,png,gif,JPG,TIFF')->setMaxFileSize(1024000)->setAttribs(array('class' => 'textInput'))->addValidator('Count', false, array('min' => 1, 'max' => 1))->addDecorator('File');
$caption = new Zend_Form_Element_Text('caption');
$caption->setLabel('Image caption')->setRequired(true)->setAttrib('size', 60)->setDecorators($decorators)->addFilters(array('StripTags', 'StringTrim'))->addErrorMessage('You must enter a label');
$rulerID = new Zend_Form_Element_Hidden('rulerID');
$rulerID->removeDecorator('label')->removeDecorator('HtmlTag')->addValidator('Int')->setRequired(true);
$hash = new Zend_Form_Element_Hash('csrf');
$hash->setValue($this->config->form->salt)->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->removeDecorator('label')->setTimeout(60);
$this->addElement($hash);
//Submit button
$submit = new Zend_Form_Element_Submit('submit');
$submit->setLabel('Upload an image of a ruler')->setAttribs(array('class' => 'large'));
$this->addElements(array($image, $rulerID, $caption, $submit))->setLegend('Add an image to a ruler profile');
$this->addDisplayGroup(array('image', 'caption'), 'details')->removeDecorator('HtmlTag');
$this->details->addDecorators(array('FormElements', array('HtmlTag', array('tag' => 'ul'))));
$this->details->removeDecorator('DtDdWrapper');
$this->details->removeDecorator('HtmlTag');
$this->addDisplayGroup(array('submit'), 'submit');
$this->submit->removeDecorator('DtDdWrapper');
$this->submit->removeDecorator('HtmlTag');
}
示例5: init
public function init()
{
$this->setMethod('post');
//$this->setAttrib('action',DOMAIN.'language/edit');
$this->setAttrib('id', 'formid');
$this->setAttrib('name', 'servicedeskdepartment');
$id = new Zend_Form_Element_Hidden('id');
$servicedeskdepartment = new Zend_Form_Element_Text("service_desk_name");
$servicedeskdepartment->setLabel("Category");
$servicedeskdepartment->setAttrib('maxLength', 30);
$servicedeskdepartment->addFilter(new Zend_Filter_StringTrim());
$servicedeskdepartment->setRequired(true);
$servicedeskdepartment->addValidator('NotEmpty', false, array('messages' => 'Please enter category.'));
$servicedeskdepartment->addValidator("regex", true, array('pattern' => '/^[a-zA-Z0-9\\- ]+$/', 'messages' => array('regexNotMatch' => 'Please enter valid category.')));
$servicedeskdepartment->addValidator(new Zend_Validate_Db_NoRecordExists(array('table' => 'main_sd_depts', 'field' => 'service_desk_name', 'exclude' => 'id!="' . Zend_Controller_Front::getInstance()->getRequest()->getParam('id') . '" AND isactive=1')));
$servicedeskdepartment->getValidator('Db_NoRecordExists')->setMessage('Category name already exists.');
$description = new Zend_Form_Element_Textarea('description');
$description->setLabel("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, $servicedeskdepartment, $description, $submit));
$this->setElementDecorators(array('ViewHelper'));
}
示例6: __construct
public function __construct(array $dataBusinessId, $options = null)
{
parent::__construct($options);
$this->setName('frmEmployee');
$this->setMethod('post');
$name = new Zend_Form_Element_Text('name');
$name->setLabel('Employee name');
$name->setAttrib('maxlength', 80);
$name->setRequired(true);
$name->addValidator(new Zend_Validate_NotEmpty());
$this->addElement($name);
$age = new Zend_Form_Element_Text('age');
$age->setLabel('Employee age');
$age->addValidator(new Zend_Validate_Int());
$this->addElement($age);
$businessId = new Zend_Form_Element_Select('business_id');
$businessId->setLabel('Business');
$businessId->setRequired(true);
$businessId->addValidator(new Zend_Validate_NotEmpty());
$businessId->addValidator(new Zend_Validate_Int());
$businessId->addMultiOptions($dataBusinessId);
$this->addElement($businessId);
$submit = new Zend_Form_Element_Submit('bt_submit');
$submit->setLabel('Save');
$this->addElement($submit);
}
示例7: init
public function init()
{
parent::init();
if (!$this->getHmHomeId()) {
throw new Exception();
}
$element = new Zend_Form_Element_Select('year');
$element->setLabel('Jaar')->setRequired(true)->addMultiOption('', '...');
$percentages = Model_Hm_Day_Percentage::findAllByHomeId($this->_hmHomeId)->execute(null, Doctrine_Core::HYDRATE_ARRAY);
$availableYears = new Model_Hm_AvailableYears($percentages, 5);
foreach ($availableYears->toArray() as $year) {
$element->addMultiOption($year, $year);
}
$this->addElement($element);
$elements[] = 'year';
for ($i = 1; $i <= 7; $i++) {
$elementName = $this->_labelTemplates[$i];
$elements[] = 'day_' . $i;
$element = new Zend_Form_Element_Text('day_' . $i);
$element->setLabel($elementName)->setRequired(true)->setAttribs(array('maxlength' => 6))->setValidators(array(array('float'), array('stringLength', false, array('max' => 6))));
$this->addElement($element);
}
$this->addDisplayGroup($elements, 'days', array('legend' => 'Percentage'));
$element = new Zend_Form_Element_Submit('submit_percentageday');
$element->setLabel('Verwerken')->setAttrib('class', 'submit');
$this->addElement($element);
$this->addDisplayGroup(array('submit_percentageday'), 'submit', array('class' => 'submit'));
$this->bhvkDecorators();
$this->bhvkDecorateSubmitElement($this->getElement('submit_percentageday'));
}
示例8: 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'));
}
示例9: __construct
/** Construct the form
* @access public
* @param type $options
* @return void
*/
public function __construct(array $options = null)
{
$cats = new CategoriesCoins();
$cat_options = $cats->getCategoriesAll();
$rulers = new Rulers();
$ruler_options = $rulers->getAllMedRulers();
parent::__construct($options);
$this->setName('MedievalType');
$type = new Zend_Form_Element_Text('type');
$type->setLabel('Medieval type: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim'))->setAttribs(array('class' => 'textInput', 'class' => 'span8'));
$broadperiod = new Zend_Form_Element_Select('periodID');
$broadperiod->setLabel('Broadperiod for type: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim', 'StringToLower'))->setAttribs(array('class' => 'input-xxlarge selectpicker show-menu-arrow'))->addMultioptions(array(null => 'Choose broadperiod', 'Available options' => array(47 => 'Early Medieval', 29 => 'Medieval', 36 => 'Post Medieval')));
$category = new Zend_Form_Element_Select('categoryID');
$category->setLabel('Coin category: ')->setAttribs(array('class' => 'textInput'))->addFilter('StringTrim')->setAttribs(array('class' => 'input-xxlarge selectpicker show-menu-arrow'))->addMultioptions(array(null => 'Choose a category', 'Available options' => $cat_options))->addValidator('InArray', false, array(array_keys($cat_options)));
$ruler = new Zend_Form_Element_Select('rulerID');
$ruler->setLabel('Ruler assigned to: ')->setAttribs(array('class' => 'input-xxlarge selectpicker show-menu-arrow'))->addFilter('StringTrim')->addMultioptions(array(null => 'Choose a ruler', 'Available options' => $ruler_options))->addValidator('inArray', false, array(array_keys($ruler_options)));
$datefrom = new Zend_Form_Element_Text('datefrom');
$datefrom->setLabel('Date type in use from: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim', 'StringToLower'));
$dateto = new Zend_Form_Element_Text('dateto');
$dateto->setLabel('Date type in use until: ')->setRequired(true)->addFilters(array('StripTags', 'StringTrim', 'StringToLower'));
//Submit button
$submit = new Zend_Form_Element_Submit('submit');
$submit->setLabel('Submit details for medieval coin type');
$this->addElements(array($type, $broadperiod, $category, $ruler, $datefrom, $dateto, $submit))->setLegend('Add an active type of Medieval coin')->setMethod('post');
parent::init();
}
示例10: init
public function init()
{
$this->setName('transfer_target');
$this->setAttrib('class', 'form-inline');
$id = new Zend_Form_Element_Hidden('id');
$id->addFilter('Int');
$host2 = new Zend_Form_Element_Text('host2');
$host2->setAttrib('class', 'form-control')->setLabel('host2');
$host2->setDecorators(array('ViewHelper', 'Label', array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group col-md-3'))));
$user2 = new Zend_Form_Element_Text('user2');
$user2->setLabel('user2');
$user2->setAttrib('class', 'form-control');
$user2->setDecorators(array('ViewHelper', 'Description', 'Errors', 'Label', array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group col-md-3'))));
$password2 = new Zend_Form_Element_Text('password2');
$password2->setLabel('pass2');
$password2->setAttrib('class', 'form-control');
$password2->setDecorators(array('ViewHelper', 'Description', 'Errors', 'Label', array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group col-md-3'))));
$submit = new Zend_Form_Element_Submit('submit');
$submit->setLabel('Submit');
$submit->setAttrib('class', 'btn btn-default');
$submit->setValue('transfer_target');
$submit->setDecorators(array('ViewHelper', 'Description', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'div', 'colspan' => 2, 'align' => 'center')), array(array('row' => 'HtmlTag'), array('tag' => 'div', 'class' => 'form-group'))));
$this->addElements(array($host2, $user2, $password2, $submit));
$this->setDecorators(array('FormElements', 'Form'));
}
示例11: init
public function init()
{
require_once APPLICATION_PATH . '/configs/translations/pt_BR.php';
$translate = new Zend_Translate('array', $translationStrings, 'pt');
$this->setTranslator($translate);
$this->addElementPrefixPath('FernandoMantoan_Validate', 'FernandoMantoan/Validate/', 'validate');
$this->setName('emprestimo');
$id = new Zend_Form_Element_Hidden('id');
$data_emprestimo = new Zend_Form_Element_Text('data_emprestimo');
$data_emprestimo->setLabel('Data do Empréstimo:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->addValidator('Date');
$membroFacade = FernandoMantoan_DesignPatterns_Factory_FactoryFacade::createInstance(FernandoMantoan_DesignPatterns_Factory_FactoryFacade::FACADE_MEMBER);
$membros_options = $membroFacade->htmlselectBusiness();
$membro_id = new Zend_Form_Element_Select('membro_id');
$membro_id->addMultiOption('', 'Escolha um Membro');
if (sizeof($membros_options) > 0) {
foreach ($membros_options as $membro) {
$membro_id->addMultiOption($membro['id'], $membro['nome']);
}
}
$membro_id->setLabel('Membro:')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty');
$valor_juros = new Zend_Form_Element_Text('valor_juros');
$valor_juros->setLabel('Valor do Juros: R$')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty')->addValidator('Float');
$submit = new Zend_Form_Element_Submit('submit');
$submit->setLabel('Salvar')->setAttrib('id', 'submitbutton');
$this->addElements(array($id, $data_emprestimo, $membro_id, $valor_juros, $submit));
}
示例12: init
/**
* Form initialization
*
* @return void
*/
public function init()
{
$this->setName('loginForm');
$this->setElementsBelongTo('loginForm');
$element = new Zend_Form_Element_Text('username');
$element->setLabel('Username')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim');
$this->addElement($element);
$element = new Zend_Form_Element_Password('password');
$element->setLabel('Password')->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim');
$this->addElement($element);
$element = new Zend_Form_Element_Checkbox('rememberMe');
$element->setLabel('Remember me');
$this->addElement($element);
/**
* @var $request Zend_Controller_Request_Http
*/
$request = Zend_Controller_Front::getInstance()->getRequest();
$element = new Zend_Form_Element_Hidden('redirect');
$element->setValue($request->getParam('from', '/'))->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim');
$element->getDecorator('HtmlTag')->setOption('class', 'hidden');
$element->getDecorator('Label')->setOption('tagClass', 'hidden');
$this->addElement($element);
$element = new Zend_Form_Element_Submit('submit');
$element->setLabel('Connection');
$this->addElement($element);
}
示例13: 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'));
}
示例14: __construct
public function __construct($options = null)
{
$this->_disabledDefaultActions = true;
$readOnly = $options['readOnlyForm'];
$payement = $options['payMean'];
$config = Zend_Registry::get('config');
unset($options['readOnlyForm']);
unset($options['payMean']);
parent::__construct($options);
$this->setAttrib('id', 'accountManagement');
$buttonLabel = $this->getView()->getClientText('form_label_confirm_order_btn');
if (in_array($payement, array('visa', 'mastercard'))) {
$this->setAction($config->payment->url);
$buttonLabel = $this->getView()->getClientText('form_label_confirm_payment_btn');
}
$baseDir = $this->getView()->baseUrl();
// Account data summary
$summary = new Cible_Form_Element_Html('summary', array('value' => $readOnly));
$summary->setDecorators(array('ViewHelper', array('label', array('placement' => 'prepend')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'form_title_inline left'))));
$this->addElement($summary);
$storeId = new Zend_Form_Element_Hidden('ps_store_id', array('value' => $config->payment->storeId));
$storeId->removeDecorator('label');
$this->addElement($storeId);
$hppKey = new Zend_Form_Element_Hidden('hpp_key', array('value' => $config->payment->hppkey));
$hppKey->removeDecorator('label');
$this->addElement($hppKey);
$total = new Zend_Form_Element_Hidden('charge_total');
$total->removeDecorator('label');
$this->addElement($total);
// Submit button
$submit = new Zend_Form_Element_Submit('submit');
$submit->setLabel($buttonLabel)->setAttrib('class', 'nextStepButton')->setDecorators(array('ViewHelper', array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'stepBottomNext'))));
$this->addElement($submit);
}
示例15: _setupElements
private function _setupElements()
{
$translate = Zend_Registry::get('Zend_Translate');
$this->setAttrib('id', 'signupForm');
$this->setTranslator($translate);
$email = new Zend_Form_Element_Text('email');
$email->setRequired(true)->addFilter('StringTrim')->addFilter('StripTags')->addValidator('NotEmpty')->removeDecorator('HtmlTag')->removeDecorator('DtDWrapper')->removeDecorator('label')->setAttrib('id', 'email')->addValidator('EmailAddress');
$email->addValidator(new Ziown_Form_Validate_EmailAddress(), false);
$email->getValidator('NotEmpty')->setMessage('Email Address is Required', 'isEmpty');
$username = new Zend_Form_Element_Text('username');
$username->setRequired(true)->addFilter('StringTrim')->addFilter('StripTags')->addValidator('NotEmpty')->removeDecorator('HtmlTag')->removeDecorator('DtDWrapper')->removeDecorator('label')->setAttrib('id', 'username');
$username->addValidator(new Ziown_Form_Validate_UserName());
$username->getValidator('NotEmpty')->setMessage('User name is Required', 'isEmpty');
$password = new Zend_Form_Element_Password('password');
$password->setRequired(true)->removeDecorator('HtmlTag')->removeDecorator('DtDWrapper')->removeDecorator('label')->setAttrib('id', 'txt-password')->setErrorMessages(array('Password is required'));
$identValidator = new Zend_Validate_Identical($_POST['password']);
$identValidator->setMessages(array('notSame' => 'Password doesn\'t match!', 'missingToken' => 'Password doesn\'t match!'));
$confirm_password = new Zend_Form_Element_Password('confirm_password');
$confirm_password->setRequired(true)->removeDecorator('HtmlTag')->removeDecorator('DtDWrapper')->removeDecorator('label')->setAttrib('id', 'txt-confirm-password')->addValidator($identValidator);
$signup = new Zend_Form_Element_Submit('signup');
$signup->setLabel('Sign Up');
$signup->removeDecorator('DtDdWrapper')->removeDecorator('HtmlTag')->setAttrib('class', 'u-login');
$this->setDecorators(array(array('ViewScript', array('script' => 'signup.phtml'))));
$this->addElements(array($username, $password, $confirm_password, $signup, $email));
}