I want to know if anyone have used radio button in form/volt, and how to assign model data to form for radio button as pre-set value. I have done for radio rendering
In form
$radio1 = new Radio("brand1", ['name'=>'type', 'value'=>3]);
$radio1->setLabel('brand1');
$radio2 = new Radio("brand2", ['name'=>'type', 'value'=>4]);
$radio2->setLabel('brand2');
$this->add($radio1);
$this->add($radio2);
in volt
<label class="radio-inline">
{{ form.render('radio1') }}
{{ form.label('radio1') }}
</label>
<label class="radio-inline">
{{ form.render('radio2') }}
{{ form.label('radio2') }}
</label>
so if model data $robot has default type of brand1, but how to assign the value to form and render it by the entity?
$robot = Robots::findFirst();
$form = new Form($robot);