Exemplo n.º 1
0
 public function init()
 {
     $this->addElement('text', 'name', array('label' => 'Country Name:', 'class' => '', 'decorators' => $this->elementDecorators));
     $continentM = new Application_Model_Continent();
     $resArr = $continentM->getContinent("--- Select Continent ---");
     $this->addElement('select', 'continent_id', array('label' => 'Continent:', 'style' => 'width: 250px;', 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'MultiOptions' => $resArr));
     $this->addElement('submit', 'submit', array('required' => false, 'ignore' => true, 'label' => 'Search', 'decorators' => $this->buttonDecorators));
 }
Exemplo n.º 2
0
 public function init()
 {
     $this->addElement('text', 'name', array('label' => 'Country Name :', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'You must enter the country name')))), 'decorators' => $this->elementDecorators));
     $continent = new Application_Model_Continent();
     $arrContinent = $continent->getContinent("--select---");
     $this->addElement('select', 'continentId', array('label' => 'Continent:', 'style' => 'width: 100%;', 'TABINDEX' => '6', 'required' => true, 'validators' => array(array('NotEmpty', true, array('messages' => array('isEmpty' => 'Please select continent')))), 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'MultiOptions' => $arrContinent));
     $this->addElement('submit', 'cmdSubmit', array('required' => false, 'ignore' => true, 'label' => 'Save', 'decorators' => $this->buttonDecorators));
 }