开发者

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')));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜