Skip to content

Deprecated since 7.2

This page documents the classic module layer (CBController and cbInit()). It still works in every 7.x release, but new code should use resources and pages.

Use instead: Radio::make('status')->options([...]).

Radio Form Type ​

Showing radio button input type

Code Sample ​

php
$this->form[] = ['label'=>'Platform','name'=>'platform','type'=>'radio','dataenum'=>'Android;Ios;Website'];

Important . You need to set the dataenum attribute, then fill it with the options. The sparate is comma.

Code Sample With Custom Value ​

php
$this->form[] = ['label'=>'Platform','name'=>'platform','type'=>'radio','dataenum'=>'1|Android;2|Ios;3|Website'];

If you want to custom the value of radio button, then put | as a sparator between the value and label.

What's Next ​

Table Of Contents ​

Released under the MIT License.