List Info

Thread: How to add custom html element to Zend_Form ?




How to add custom html element to Zend_Form ?
user name
2008-05-04 18:31:50
I have a form like this:

class PostForm extends Zend_Form
{
    public function init()
    {
	// [setMethod & setAction]
	// ...

	$e = $this->createElement('text', 'title');
	$e->setLabel('Title');
	$this->addElement($e);

	$e = $this->createElement('textarea', 'body');
	$e->setLabel('Body');
	$this->addElement($e);

	// [and many elements in post's config]
	// ...

	$e = $this->createElement('submit', 'submit');
	$e->setLabel('Submit');
	$this->addElement($e);
    }
}

Now, how to add H1 element between "title" and
"body" ?

Thanks for your reading and helping.

-- 
* Gea-Suan Lin                                    http://blog.gslin.org/
* If you cannot convince them, confuse them.           --
Harry S Truman

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )