News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Rob Allen's Blog:
Top Tip XHTML with Zend Form Elements
May 29, 2008 @ 12:01:50

Rob Allen has posted a quick tip of how to use the Zend_Form component of the Zend Framework to correctly render XHTML compliant output.

When you render a Zend_Form, the elements will render to HTML compliance rather than XHTML compliance, even if you have < ?php echo $this->doctype('XHTML1_STRICT');?> at the top of your layout script. Practically, this means that all the input elements do not end in "/>". To resolve this, you need to call the doctype() view helper prior to rendering your form.

He includes an example of the doctype call (on a view object) to tell the script to output in the "XHTML1_TRANSITIONAL" format.

0 comments voice your opinion now!
zendform zendframework component xhtml render transitional


blog comments powered by Disqus

Similar Posts

Daniel Cousineau's Blog: Zend Framework Module Init Script (Controller Plugin)

NETTUTS.com: Book Review: Zend Framework 1.8 Web Application Development

Carsten Lucke's Blog: Introductory article on the Zend Framework for t3n magazine

MaltBlue.com: Zend Form Mastery with Zend_Config - Part 2, Core Form Configuration

Chris Hartjes' Blog: "U R Doin It Wrong" Adventures with flexible forms in Zend Framework


Community Events





Don't see your event here?
Let us know!


framework language conference interview voicesoftheelephpant deployment api series introduction code bugfix list release symfony laravel podcast threedevsandamaybe tips zendserver community

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework