Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 2nd, 2012  |  syntax: None  |  size: 0.62 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $fromSubForm = new Zend_Form_SubForm();
  2.                 $this->setDefaultDecorators($fromSubForm);
  3.                
  4.                 //Add Elements
  5.                 $fromSubForm->addElement(
  6.                     'select', 'ytitle', array(
  7.                         'label' => 'Title',
  8.                         'required' => true,
  9.                         'multioptions'   => array(
  10.                                         'default'=>'* select title',
  11.                                                                 'mr'=>'mr',
  12.                                                                 'mrs'=>'mrs',
  13.                                                                 'ms'=>'ms'
  14.                                     ),
  15.                         'filters'    => array('StringTrim'),
  16.                                 'decorators' => array(
  17.                                                     'ViewHelper',
  18.                                                     'Errors',
  19.                                                     'Label',
  20.                                                     array('HtmlTag', array('tag' => 'div', 'class' => 'test class')))
  21.                 ));