Is it possible to force the form helper to render a field as required even if it isn't in CakePHP?
Is there some parameter or workaround I can use to have the form helper render a field as if it were required by the model even if the model does not actually require it?
(I'm looking for 开发者_C百科the cakephp required rendering type, not the actual 'required' form property making this a different question than Cakephp Form Helper)
All the "required" style is is a specific CSS class you can set yourself:
$this->Form->input('foo', array('div' => array('class' => 'input text required')));
精彩评论