some basic form work, need to lear more about custom form validation/rendering.

This commit is contained in:
Naomi 2011-01-28 17:37:31 -05:00
parent 381cdc11a9
commit 10d9d13993
11 changed files with 791 additions and 619 deletions

View file

@ -8,15 +8,25 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
// Add name element
$this->addElement('text', 'add_show_name', array(
'label' => 'Name:',
'class' => 'input_text',
'required' => true,
'filters' => array('StringTrim'),
'validators' => array('NotEmpty')
));
$nameLabel = $this->getElement('add_show_name');
$nameLabel->setDecorators(array(array('ViewScript', array(
'viewScript' => 'testform.phtml',
'class' => 'test template'
))));
// Add the description element
$this->addElement('textarea', 'add_show_description', array(
'label' => 'Description:',
'required' => false,
'class' => 'input_text_area'
));
}