
Mecze sie z jednym problemem od kilku dni i moze tu znajde pomoc:)
Wiec tak. Tworze sobie klase formularza
class My_Form_AddClient extends Zend_Form{ 'ViewHelper', 'Errors', ); 'ViewHelper', ); public function init(){ $this->_build(); $this->_setupDefaults(); my_print_r($this->getMessages()); } protected function _build(){ 'decorators' => $this->elementDecorators, 'label' => 'Nazwa firmy:', 'required' => true, ) ); 'decorators' => $this->elementDecorators, 'label' => 'First Name:') ); 'decorators' => $this->elementDecorators, 'label' => 'Last Name:') ); 'decorators' => $this->buttonDecorators, 'label' => 'Save') ); } protected function _setupDefaults(){ $controller = Zend_Controller_Front::getInstance(); } public function loadDefaultDecorators(){ 'FormElements', 'Form', )); }
i teraz - mam problem z tym aby zmienic styl ramki odpowiedniego pola w przypadku kiedy byla podana zla wartosc. Tzn ta ktora nie przeszla validacji. Czy jest to do zrobienia w ZF w miare przystepny sposob ?
Pozdrawiam