Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Form_DetailsForm extends Zend_Form
- {
- public function init()
- {
- // ...
- $phone = new Zend_Form_Element_Text('phone');
- $phoneLabelExtra = $translate->_('deal511-extra');
- $labelText = sprintf("%s \n<br /><span class=\"label-description\">%s</span>",
- htmlspecialchars($translate->_('deal511')), htmlspecialchars($phoneLabelExtra)
- );
- Zend_Registry::get('fb')->info($labelText);
- $phone->setLabel($labelText)
- ->addFilters(array(
- 'StringTrim',
- 'HtmlEntities'
- ))
- ->addValidator('NotEmpty', true)
- ->setRequired(true)
- ->setOptions(array('class' => 'field-phone'));
- $labelDecorator = $phone->getDecorator('Label');
- $labelDecorator->setOption('escape', false);
- $this->addElement($phone);
- // ...
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement