Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-20-2008, 08:38 AM
Junior Member
 
Join Date: Jun 2008
Posts: 2
Default zend_form not valid w3c

hi,
I have created a simply form with an input like this:

$name = new Zend_Form_Element_Text('name');
$name->setLabel('Nome')
->setRequired(true)
->addFilter('StripTags')
->addFilter('StringTrim')
->addValidator('NotEmpty');

do you know why my input is not valid w3c?
my output-> <input type="text" name="name" id="name" value="">
zend guide output-> <input type="text" name="name" id="name" value="" />

I have to configure something?
Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-04-2008, 11:10 PM
Junior Member
 
Join Date: Oct 2007
Posts: 27
Default

In your bootstrap, you need to call something like

PHP Code:
$viewRenderer Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
        
        
$viewRenderer->initView();
        
        
$view $viewRenderer->view;
        
        
$view->docType('HTML4_STRICT'); 
The last line tells helpers whether to produce HTML or XHTML markup.

You need to set the appropriate XHTML doctype to produce tags that end with />
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:28 AM.