Esempio n. 1
0
 public function init()
 {
     $this->addElement('text', 'name', array('label' => 'State Name :', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'You must enter the state name')))), 'decorators' => $this->elementDecorators));
     $region = new Application_Model_Region();
     $arrRegion = $region->getRegion("--select---");
     $this->addElement('select', 'regionId', array('label' => 'Region :', 'style' => 'width: 100%;', 'TABINDEX' => '6', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select region')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'MultiOptions' => $arrRegion));
     $this->addElement('submit', 'cmdSubmit', array('required' => false, 'ignore' => true, 'label' => 'Save', 'decorators' => $this->buttonDecorators));
 }