Cytat(MickDev @ 7.01.2011, 15:59:47 )

Nie wiem, czy dobrze zrozumiałem (chyba nie), ale zrobiłem tak:
Plik z formularzem:
class Form_RejestracjaForm extends Zend_Form
{
public function __construct($options = null) {
parent::__construct($options);
}
public function init(){
$this->setMethod('post');
$this->setName('rejestracja');
$pole = new Zend_Form_Element_Textarea('pole');
$this->addElement($pole);
$pole->setLabel("Dodatkowe informacje/uwagi:");
array('validator'=>'StringLength','options'=>array
(0
,200
)) );
'StringTrim',
'StripTags'
);
'ViewHelper',
'Errors',
'Description',
);
$pole->setDecorators($decorators)
->addFilters($filters)
->addValidators($validators)
->setAttrib('COLS', '40')
->setAttrib('ROWS', '4');
}
Kontroler:
class RejestracjaController extends Zend_Controller_Action
{
public function init()
{
$this->form = new Form_RejestracjaForm();
}
public function indexAction()
{
if ($this->_request->isPost())
{
$formData = $this->_request->getPost();
if ($this->form->isValid($formData))
{
return $this->_forward('poprawne');
}
else
{
$this->form->populate($formData);
}
}
$this->view->form = $this->form;
}
public function poprawneAction()
{
$this->view->dane = $this->form->getValue('pole');
}
}
No i akcja 'poprawne':
I niestety nie działa - nie przesyła nic.