Inserting a text string or paragraph into Zend_Form

  • SumoMe

If you want to add text after element in form just use description of form element.

textElement = new Zend_Form_Element('someElement'); 
$textElement->setDescription('TEXT'); 

or in the form file:

        $this->addElement(
            'text',
            'some element',
            array(
                'label'         => 'Some element:',
                'description'   => 'TEXT',
            )
        );

If you are wanting something more complex you must define your own decorator.

Leave a Reply


*