Richard Parnaby-King

Zend_Form – prefix text using decorator

I want to prefix the form with a title, within the form tags, but above the form elements.


Login Form


Further more, I do not want to use a view script.

‘tag’ => ‘h3’
->setDescription(‘Login Form’);

Depending where you place the description decorator will determine where in the form tags it displays, i.e. place above ‘FormElements’ to display above the elements; place below ‘FormElements’ to display the description below the elements; place below the ‘Form’ decorator to display after the form tags.