views:

223

answers:

1

I have a form which I create manually (a lot of JS in it...).
I am using the Zend_Form classes in the server side to validate input and some more.
Is there a way to get a Zend_Form_Element_Select (or any other element) to be rendered without rendering the entire Zend_Form object?

+1  A: 

Do you mean something like,

$element = new Zend_Form_Element_Select(...);
echo $element->render();

?

That will render only a Select element, not an entire form.

That method is defined in the Zend_Form_Element class that is the parent of all the Zend_Form_Element_* classes. See the API for more information.

Gastón
Thanks, had to add echo and it worked.
Itay Moav
That's right, I forgot that Zend returns strings instead of making echoes.
Gastón