Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个以模型为源的表单:
$form->setModel("test");
在模型中,我们可以定义字段类型,例如:boolean 将在表单中制作复选框。现在我们如何定义呈现为单选按钮的类型?
只需像这样在模型中指定类型
$this->addField("name")->setValueList(array('1'=>1, '2'=>2))->type('radio');