Question

I hav a form which has a model as a source:

$form->setModel("test");

In model, we can define the field type, for example: boolean will make the checkbox in form. now how can we define the type which be rendered as Radio buttons?

Was it helpful?

Solution

Just specify type in your Model like so

$this->addField("name")->setValueList(array('1'=>1, '2'=>2))->type('radio');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top