0

我需要 Cakephp 使用创建输入字段,$this->Form->input()并在此字段参数中添加 Html 属性 - required="required"

我怎样才能做到这一点?

4

1 回答 1

2

只需按照文档进行即可。第二个参数采用所有选项(html 和其他):

$this->Form->input('field_name', array('required'=>true));
于 2013-01-16T08:52:25.133 回答