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


PHP Zend_Form_Element_Text::setDescription方法代码示例

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


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

示例1: init

 public function init()
 {
     $this->setMethod('POST');
     $this->setName('guestForm');
     $element = new Zend_Form_Element_Text('name');
     $element->setLabel('怎么称呼您');
     $element->setDescription('必填,中英文都可,2到30个字');
     $element->setRequired(true);
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('email');
     $element->setLabel('您的Email');
     $element->setRequired(true);
     $element->addValidator(new Zend_Validate_EmailAddress());
     $element->addValidator('NotEmpty');
     $element->setDescription('必填');
     $this->addElement($element);
     $element = new Zend_Form_Element_Textarea('body');
     $element->setLabel('您的留言');
     $element->setAttrib('rows', 4);
     $element->addValidator('NotEmpty');
     $this->addElement($element);
     $element = new Elements();
     $element->addReCaptcha($this);
     $element = new Zend_Form_Element_Submit('post');
     $element->setValue('提交')->removeDecorator('Label');
     $this->addElement($element);
 }
开发者ID:BGCX262,项目名称:zufangzi-svn-to-git,代码行数:27,代码来源:GuestBook.php

示例2: init

 public function init()
 {
     parent::init();
     $this->setAction('/core/feedback/programme');
     $id = new Zend_Form_Element_Hidden('id');
     $id->setRequired(true)->setLabel('id')->addValidators(array('Int'))->setDecorators(array('Composite'));
     $best = new Zend_Form_Element_Textarea('best_stuff');
     $best->setLabel('Which sessions or presentations were the best – and why?')->setAttrib('class', 'medium')->setDescription('Please limit your comments to 1000 characters')->setRequired(false)->addValidator('StringLength', true, array(1, 5000, 'messages' => array(Zend_Validate_StringLength::TOO_SHORT => 'Please provide a longer comment', Zend_Validate_StringLength::TOO_LONG => 'Your comment is too long')))->setDecorators(array('Composite'));
     $worst = clone $best;
     $worst->setName('worst_stuff')->setLabel('Which sessions or presentations were the worst – and why?');
     $comments = clone $best;
     $comments->setName('comments')->setLabel('Comments on the programme');
     $this->addElements(array($id, $best, $worst));
     $elements = array('exhibition' => 'How useful did you find the exhibitions and demos?', 'meetings' => 'How useful did you find the meetings / workshops around the conference?', 'lightning' => 'How useful did you find the lightning talks?', 'poster' => 'How useful did you find the poster presentations?');
     // add all elements in loop, since they are all the same
     foreach ($elements as $name => $label) {
         $newSelect = new Zend_Form_Element_Radio($name);
         $newSelect->setLabel($label)->setAttrib('class', 'tiny')->setMultiOptions($this->_getFieldValues('rating', 'feedback'))->setDecorators(array('Composite'));
         $newText = new Zend_Form_Element_Text('remarks_' . $name);
         $newText->setDescription('Comments')->setAttrib('class', 'medium')->setDecorators(array('Composite'));
         $this->addElements(array($newSelect, $newText));
     }
     $this->addElement($comments);
     $this->addElement('submit', 'submit', array('decorators' => $this->_buttonElementDecorator));
 }
开发者ID:GEANT,项目名称:CORE,代码行数:25,代码来源:Programme.php

示例3: init

 public function init()
 {
     $this->setMethod('POST');
     $this->setName("adminForm");
     $element = new Zend_Form_Element_Hidden('id');
     $element->setValue($this->advertisement->id);
     $this->addElement($element);
     $element = new Zend_Form_Element_Hidden('city');
     $element->setValue($this->city);
     $this->addElement($element);
     $element = new Zend_Form_Element_Radio('action');
     $element->setMultiOptions(array('0' => '已解决, 关闭帖子', '1' => '打错了些东东, 修改帖子', '2' => '我是管理员, 删除帖子'));
     $element->setValue(0);
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('password');
     $element->setLabel('密码');
     $element->setDescription('忘记密码?');
     $this->addElement($element);
     $element = new Elements();
     $element->addReCaptcha($this);
     $element = new Zend_Form_Element_Submit('post');
     $element->setLabel('提交')->removeDecorator('Label');
     $this->addElement($element);
     $this->addDisplayGroup(array('password', 'captcha', 'post'), 'leftMargin');
     $this->getDisplayGroup('leftMargin')->removeDecorator('DtDdWrapper');
 }
开发者ID:BGCX262,项目名称:zufangzi-svn-to-git,代码行数:26,代码来源:AdminPost.php

示例4: init

 public function init()
 {
     $country_code = new Zend_Form_Element_Text('country_code');
     $country_code->setLabel('Country code');
     $country_code->setDescription('List of codes you can see here: http://framework.zend.com/manual/1.12/en/zend.locale.appendix.html');
     $country_code->setRequired(true);
     $this->addElement($country_code);
     $name = new Zend_Form_Element_Text('name');
     $name->setLabel('Name');
     $name->setRequired(true);
     $this->addElement($name);
     $is_active = new Zend_Form_Element_Checkbox('is_active');
     $is_active->setLabel('Active');
     $is_active->setRequired(true);
     $this->addElement($is_active);
     $cancel = new Zend_Form_Element_Button('cancel');
     $cancel->setLabel('Cancel');
     $cancel->setAttrib('class', 'btn btn-gold')->setAttrib('style', 'color:black');
     $cancel->setAttrib("onClick", "window.location = window.location.origin+'/locale/languages/'");
     $this->addElement($cancel);
     $submit = new Zend_Form_Element_Submit('save');
     $submit->setAttrib('class', 'btn btn-primary');
     $submit->setLabel('Confirm');
     $this->setAction('')->setMethod('post')->addElement($submit);
 }
开发者ID:zelimirus,项目名称:yard,代码行数:25,代码来源:Languages.php

示例5: init

 public function init()
 {
     /* Form Elements & Other Definitions Here ... */
     $name = new Zend_Form_Element_Text("name");
     $name->setLabel("You Name : ");
     $name->setRequired(true);
     $website = new Zend_Form_Element_Text("website");
     $website->setLabel("Your Website : ");
     $website->setDescription(" http://www.google.com ");
     $email = new Zend_Form_Element_Text("email");
     $email->setLabel("Email Address : ");
     $email->setDescription(" Example : john@googe.com ");
     $email->addValidator("EmailAddress", false, array('messages' => array(Zend_Validate_EmailAddress::INVALID_FORMAT => "Invalid Email Address Ya tayeb")));
     $email->setRequired(true);
     $body = new Zend_Form_Element_Textarea("body");
     $body->setLabel("Text Message : ");
     $body->setAttrib("class", "textbox");
     $body->setAttrib("rows", "6");
     $body->setAttrib("cols", "60");
     $body->setRequired(true);
     $submit = new Zend_Form_Element_Submit("contact");
     $this->addElement($name);
     $this->addElements(array($website, $email, $body, $submit));
     $this->addElement("hash", "contact_us_hash_form");
 }
开发者ID:euginepj,项目名称:Skeleton-Zend-APP,代码行数:25,代码来源:Contact.php

示例6: init

 public function init()
 {
     parent::init();
     $this->setAction('/core/feedback/participant');
     $id = new Zend_Form_Element_Hidden('id');
     $id->setRequired(true)->setLabel('id')->addValidators(array('Int'))->setDecorators(array('Composite'));
     $country = new TA_Form_Element_Country('country');
     $country->setLabel('Please select the country in which you work as primary place of employment.')->setDecorators(array('Composite'));
     $orgType = new Zend_Form_Element_Select('org_type');
     $orgType->setLabel('Please select the type of organisation that most closely resembles your primary place of employment.')->setAttrib('class', 'medium')->setMultiOptions(array('0' => '---', 'nren' => 'National Research and Education Network (NREN)', 'high' => 'Higher / Further Education Institute (universities / college / polytechnic...)', 'ari' => 'Academic Research Institute', 'project' => 'Research project', 'admin' => 'Administrative departments of academic institutions', 'local' => 'Local / regional / central government department', 'cultural' => 'Cultural organisation (galeries, librairies, museums, etc.)', 'comm' => 'Commercial organisation', 'other' => 'Other non-profit (specify)'))->setDecorators(array('Composite'));
     $orgOther = new Zend_Form_Element_Text('org_type_other');
     $orgOther->setDescription('Other, please specify')->setAttrib('class', 'medium')->setDecorators(array('Composite'));
     $occupation = new Zend_Form_Element_Select('occupation');
     $occupation->setLabel('Please select the title that most closely resembles your primary role in the organisation.')->setAttrib('class', 'medium')->setMultiOptions(array('0' => '---', 'director' => 'Director (responsible for overall organisational management)', 'manager' => 'Technical Manager', 'admin' => 'Administrative / Operational Manager', 'tech' => 'Technical staff / Engineer', 'res' => 'Researcher / Scientist', 'prof' => 'Professor / Teacher', 'pr' => 'Public Relations / Communications', 'bizz' => 'Business Development', 'stud' => 'Student', 'other' => 'Other (specify)'))->setDecorators(array('Composite'));
     $occOther = new Zend_Form_Element_Text('occupation_other');
     $occOther->setDescription('Other, please specify')->setAttrib('class', 'medium')->setDecorators(array('Composite'));
     $interest = new Zend_Form_Element_MultiCheckbox('interest');
     $interest->setLabel('Please select your main areas of interest. Up to three selections are possible.')->setAttrib('class', 'tiny')->setMultiOptions(array('sec' => 'Network security (incident, prevention and response)', 'nom' => 'Network operations management', 'clouds' => 'Storage and clouds', 'grids' => 'Grids', 'media' => 'Media management and distribution', 'auth' => 'Authentication and Authorisation systems and federations', 'wireless' => 'Fixed & mobile wireless and roaming technologies', 'vid' => 'Video / web-based conferencing', 'reg' => 'Regulatory issues including privacy', 'pr' => 'PR / communications / business development', 'strat' => 'Strategic development: European policy setting and / or organisational management', 'other' => 'Other (specify)'))->addValidator('Callback', true, array('callback' => function ($value, $arr) {
         return count($arr['interest']) > 3 ? false : true;
     }, 'messages' => array(Zend_Validate_Callback::INVALID_VALUE => "Please don't select more than three options")))->setDecorators(array('Composite'));
     $intOther = new Zend_Form_Element_Text('interest_other');
     $intOther->setDescription('Other, please specify')->setAttrib('class', 'medium')->setDecorators(array('Composite'));
     $this->addElements(array($id, $country, $orgType, $orgOther, $occupation, $occOther, $interest, $intOther));
     $this->addElement('submit', 'submit', array('decorators' => $this->_buttonElementDecorator));
 }
开发者ID:br00k,项目名称:tnc-web,代码行数:25,代码来源:Participant.php

示例7: init

 /**
  * Form initialization
  *
  * @return void
  */
 public function init()
 {
     $url = Zend_Controller_Front::getInstance()->getRouter()->assemble(array('module' => "flex", 'controller' => 'panel', 'action' => 'form'), 'default');
     $this->setAction($url)->setMethod('post');
     $this->setLegend(sprintf(Zoo::_('Edit %s'), $this->target->name));
     $name = new Zend_Form_Element_Text('name');
     $name->setLabel('Name')->setRequired(true);
     $name->setDescription('Administration-side identifier');
     $title = new Zend_Form_Element_Text('title');
     $title->setLabel('Title');
     $title->setDescription('User-visible title of panel');
     $layout = new Zend_Form_Element_Select('layout');
     $layout->setLabel('Layout');
     $layout->setMultiOptions($this->getLayouts());
     $category = new Zend_Form_Element_Text('category');
     $category->setLabel('Category');
     $category->setDescription('Administration-side grouping');
     $category->setRequired(true);
     $submit = new Zend_Form_Element_Submit('save');
     $submit->setLabel('save')->setOrder(100);
     $this->addElements(array($name, $title, $layout, $category));
     $legend = Zoo::_("Basic options");
     $this->addDisplayGroup(array('name', 'title', 'layout', 'category'), 'block_form', array('legend' => $legend));
     $this->addElement($submit);
     if ($this->target->id > 0) {
         $id_ele = new Zend_Form_Element_Hidden('id');
         $id_ele->setValue(intval($this->target->id));
         $this->addElement($id_ele);
     }
     $this->populate($this->target->toArray());
 }
开发者ID:BGCX261,项目名称:zoocms-svn-to-git,代码行数:36,代码来源:Panel.php

示例8: renderFormElement

 public function renderFormElement()
 {
     $elm = new Zend_Form_Element_Text($this->getName(), array('label' => $this->getLabel() . ':', 'class' => 'mask'));
     $elm->setDescription($this->getDescription());
     $elm->setValue($this->getValue());
     $elm->setRequired($this->getRequired());
     return $elm;
 }
开发者ID:ncsuwebdev,项目名称:otframework,代码行数:8,代码来源:Password.php

示例9: init

 public function init()
 {
     $this->setMethod("POST");
     $this->setName("createAdAgencyForm");
     if (!empty($this->next)) {
         $element = new Zend_Form_Element_Hidden("next");
         $element->setValue($this->next);
         $this->addElement($element);
     }
     $element = new Zend_Form_Element_Hidden(AdvertisingAgency::CITY);
     $element->setValue($this->city->id);
     $this->addElement($element);
     $element = new Zend_Form_Element_Text(User::NAME);
     $element->setLabel('怎么称呼您');
     $element->setDescription('必填,中英文都可,2到30个字');
     $this->addElement($element);
     $element = new Zend_Form_Element_Text(User::EMAIL);
     $element->setLabel('您的Email');
     $element->setDescription('必填,方便我们联系您');
     $element->setRequired(true);
     $element->addValidator(new Zend_Validate_EmailAddress());
     $element->addValidator('NotEmpty');
     $this->addElement($element);
     $element = new Zend_Form_Element_Text(User::MOBILE);
     $element->setLabel('您的手机号');
     $element->addFilter(new Zend_Filter_HtmlEntities());
     $element->addFilter(new Zend_Filter_StripTags());
     $element->setDescription('方便我们及时联系您');
     $this->addElement($element);
     $this->addDisplayGroup(array('city_id', 'name', 'email', 'mobile'), 'aboutYou');
     $this->getDisplayGroup('aboutYou')->removeDecorator('DtDdWrapper');
     $element = new Zend_Form_Element_Textarea(AdvertisingAgency::DESCRIPTION);
     $element->setAttrib('rows', 6);
     $element->setLabel("有哪些人要入住?基本情况?尽量详细!");
     $element->setDescription('如:三口之家,男30岁在爱立信有稳定工作,不吸烟;女27岁在kth读计算机硕士,不吸烟,男孩6岁。整洁,爱干净。');
     $element->setRequired(true);
     $this->addElement($element);
     $element = new Zend_Form_Element_Textarea(AdvertisingAgency::COMMENT);
     $element->setAttrib('rows', 6);
     $element->setLabel("对房子的要求?最高房租?最小面积?地点?入住时间?");
     $element->setDescription('如:最好是一室一厅的整个公寓,也可以与其他人合租。可以合用厨房卫生间。最高房租10000kr每月,最小面积30平米。地点只要是地铁附近,不要离中心太远都可以。入住时间是9月1日,希望能长租。');
     $element->setRequired(true);
     $this->addElement($element);
     $element = new Elements();
     $element->addReCaptcha($this);
     $element = new Zend_Form_Element_Submit("post");
     $this->addElement($element);
     $this->addDisplayGroup(array(AdvertisingAgency::DESCRIPTION, AdvertisingAgency::COMMENT, 'challenge', 'post'), 'aboutRoom');
     $this->getDisplayGroup('aboutRoom')->removeDecorator('DtDdWrapper');
 }
开发者ID:BGCX262,项目名称:zufangzi-svn-to-git,代码行数:50,代码来源:CreateAdvertisingAgency.php

示例10: _buildElements

 private function _buildElements()
 {
     $date = new Zend_Form_Element_Text($this->_name . "_Date");
     $date->setLabel("Date de publication");
     $date->addValidator(new Zend_Validate_Date(array("format" => "dd/MM/yyyy hh:mm")), true);
     $date->setDescription("JJ/MM/AAAA hh:mm");
     $date->setAttrib("size", 16);
     $date->addDecorators(array("br" => new Zend_Form_Decorator_HtmlTag(array("tag" => "br", "noAttribs" => true)), "hr" => new Zend_Form_Decorator_HtmlTag(array("tag" => "hr", "noAttribs" => true))));
     $active = new Zend_Form_Element_Checkbox($this->_name . "_Active");
     $active->setLabel("Est Actif");
     $active->removeDecorator("dtDdWrapper");
     $submit = new Zend_Form_Element_Submit($this->_name . "_Submit");
     $submit->setLabel("Creer");
     return array($date, $active, $submit);
 }
开发者ID:esandre,项目名称:CoeurDeTruffes,代码行数:15,代码来源:Add.php

示例11: getTokenElement

 /**
  * Returns/sets a password element.
  *
  * @return \Zend_Form_Element_Password
  */
 public function getTokenElement()
 {
     $element = $this->getElement($this->_tokenFieldName);
     if (!$element) {
         $tokenLib = $this->tracker->getTokenLibrary();
         $max_length = $tokenLib->getLength();
         // Veld token
         $element = new \Zend_Form_Element_Text($this->_tokenFieldName);
         $element->setLabel($this->translate->_('Token'));
         $element->setDescription(sprintf($this->translate->_('Enter tokens as %s.'), $tokenLib->getFormat()));
         $element->setAttrib('size', $max_length + 2);
         $element->setAttrib('maxlength', $max_length);
         $element->setRequired(true);
         $element->addFilter($this->tracker->getTokenFilter());
         $element->addValidator($this->tracker->getTokenValidator());
         $this->addElement($element);
     }
     return $element;
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:24,代码来源:AskTokenForm.php

示例12: init

 public function init()
 {
     $key = new Zend_Form_Element_Text('key');
     $key->setLabel('Key');
     $key->setRequired(true);
     $key->setDescription('Key must contain small letters. Blank space replace with _');
     $this->addElement($key);
     $description = new Zend_Form_Element_Text('description');
     $description->setLabel('Description');
     $description->setRequired(true);
     $this->addElement($description);
     $cancel = new Zend_Form_Element_Button('cancel');
     $cancel->setLabel('Cancel');
     $cancel->setAttrib('class', 'btn btn-gold')->setAttrib('style', 'color:black');
     $cancel->setAttrib("onClick", "window.location = window.location.origin+'/locale/translate-keys/'");
     $this->addElement($cancel);
     $submit = new Zend_Form_Element_Submit('save');
     $submit->setAttrib('class', 'btn btn-primary');
     $submit->setLabel('Confirm');
     $this->setAction('')->setMethod('post')->addElement($submit);
 }
开发者ID:zelimirus,项目名称:yard,代码行数:21,代码来源:TranslateKeys.php

示例13: init

 public function init()
 {
     $this->setMethod('POST');
     $this->setName('sendEmailForm');
     //$this->setAction('index/view');
     $element = new Zend_Form_Element_Hidden('id');
     $element->setValue($this->advertisement->id);
     $this->addElement($element);
     $element = new Zend_Form_Element_Hidden('city');
     $element->setValue($this->city);
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('name');
     $element->setLabel('怎么称呼您');
     $element->setRequired(true);
     $element->setDescription('必填');
     $this->addElement($element);
     $element = new Zend_Form_Element_Text('email');
     $element->setLabel('您的Email');
     $element->setRequired(true);
     $element->addValidator(new Zend_Validate_EmailAddress());
     $element->addFilter(new Zend_Filter_HtmlEntities());
     $element->addFilter(new Zend_Filter_StripTags());
     $element->addValidator('NotEmpty');
     $element->setDescription('必填');
     $this->addElement($element);
     $element = new Zend_Form_Element_Textarea('body');
     $element->setLabel('内容');
     $element->setRequired(true);
     $element->addValidator('NotEmpty');
     $element->setDescription('必填');
     $element->setAttrib('rows', 4);
     $this->addElement($element);
     $element = new Elements();
     $element->addReCaptcha($this);
     $element = new Zend_Form_Element_Submit('send');
     $element->setValue('发送');
     $element->removeDecorator('Label');
     $this->addElement($element);
 }
开发者ID:BGCX262,项目名称:zufangzi-svn-to-git,代码行数:39,代码来源:SendIntrestMail.php

示例14: init

 /** Initialise the form
  * @access public
  * @return void
  */
 public function init()
 {
     $username = new Zend_Form_Element_Text('username');
     $username->setLabel('Your username');
     $username->setRequired(true)->addFilters(array('StringTrim', 'StripTags'))->addValidator('Db_RecordExists', false, array('table' => 'users', 'field' => 'username'));
     $activationKey = new Zend_Form_Element_Text('activationKey');
     $activationKey->setLabel('Your activation key');
     $activationKey->setDescription('Your key was sent in your activation email')->setRequired(true)->addFilters(array('StringTrim', 'StripTags'))->addValidator('Db_RecordExists', false, array('table' => 'users', 'field' => 'activationKey'));
     $email = new Zend_Form_Element_Text('email');
     $email->setLabel('Your email address');
     $email->setRequired(true)->addValidator('Db_RecordExists', false, array('table' => 'users', 'field' => 'email'))->addValidator('EmailAddress', false, array('mx' => true));
     $hash = new Zend_Form_Element_Hash('csrf');
     $hash->setValue($this->_salt)->setTimeout(480);
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setLabel('Activate me!');
     $this->addElement($submit);
     $this->addElements(array($username, $activationKey, $email, $hash));
     $this->addDisplayGroup(array('username', 'email', 'activationKey'), 'userdetails');
     $this->addDisplayGroup(array('submit'), 'buttons');
     $this->setLegend('Enter details: ');
     parent::init();
 }
开发者ID:lesleyauk,项目名称:findsorguk,代码行数:26,代码来源:ActivateForm.php

示例15: init

 public function init()
 {
     parent::init();
     $this->setAction('/core/feedback/general');
     $id = new Zend_Form_Element_Hidden('id');
     $id->setRequired(true)->setLabel('id')->addValidators(array('Int'))->setDecorators(array('Composite'));
     $confRating = new Zend_Form_Element_Radio('rating');
     $confRating->setLabel('How would you rate the conference overall?')->setAttrib('class', 'tiny')->setMultiOptions($this->_getFieldValues('rating', 'feedback'))->setDecorators(array('Composite'));
     $partReasons = new Zend_Form_Element_MultiCheckbox('part_reasons');
     $partReasons->setLabel('Please select your top three reasons for participating in the TERENA conference')->setAttrib('class', 'tiny')->setMultiOptions(array('networking' => 'Networking opportunities (i.e. opportunities to form new professional contacts)', 'collaboration' => 'Collaboration opportunities (i.e. opportunities to work together with others on a common area of interest)', 'interesting' => 'Interesting topic/speaker that could help me in my job', 'exposure' => 'Visibility/exposure within the Research & Education Community', 'management' => 'It is encouraged by my management', 'support' => 'To support the ongoing development of the research & education community as a whole', 'other' => 'Other'))->setDecorators(array('Composite'));
     $partOther = new Zend_Form_Element_Text('why_other_spec');
     $partOther->setDescription('Other, please specify')->setAttrib('class', 'medium')->setDecorators(array('Composite'));
     $confHear = new Zend_Form_Element_MultiCheckbox('conf_hear');
     $confHear->setLabel('How did you hear about the conference? (check all that apply)')->setAttrib('class', 'tiny')->setMultiOptions(array('last' => 'During the last conference', 'pp' => 'Printed promotion', 'email' => 'Email', 'col' => 'Colleagues', 'web' => 'TERENA or NREN website', 'sns' => 'Social networking site (Facebook, Linkedin, Twitter...etc)', 'other' => 'Other'))->setDecorators(array('Composite'));
     $hearOther = new Zend_Form_Element_Text('heard_other_spec');
     $hearOther->setDescription('Other, please specify')->setAttrib('class', 'medium')->setDecorators(array('Composite'));
     $beenBefore = new Zend_Form_Element_Radio('been_before');
     $beenBefore->setLabel('Have you been to a TERENA conference before?')->setAttrib('class', 'tiny')->setMultiOptions(array('no' => 'No', 'yesone' => 'Yes, once', 'yestwice' => 'Yes, twice', 'yesthree' => 'Yes, three times and more'))->setDecorators(array('Composite'));
     $comeAgain = new Zend_Form_Element_Radio('come_again');
     $comeAgain->setLabel('Will you come to the TERENA conference again?')->setAttrib('class', 'tiny')->setMultiOptions(array('yes' => 'Yes, definitely', 'maybe' => 'Yes, maybe', 'un' => 'Undecided', 'probnot' => 'Probably not', 'no' => 'No'))->setDecorators(array('Composite'));
     $this->addElements(array($id, $confRating, $partReasons, $partOther, $confHear, $hearOther, $beenBefore, $comeAgain));
     $this->addElement('submit', 'submit', array('decorators' => $this->_buttonElementDecorator));
 }
开发者ID:GEANT,项目名称:CORE,代码行数:23,代码来源:General.php


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