update 0.01
This commit is contained in:
parent
730dc8c7ac
commit
1d20c0863b
@ -37,11 +37,10 @@ $activeForm->field(class: TextInput::class, name: 'bbb', params: [])
|
||||
->render();
|
||||
|
||||
$activeForm->field(class: Radio::class, name: 'nameee',params: ["style" => "color:RED;display:flex"])
|
||||
->setLabel("bbbbb")
|
||||
->setOptions(['1' => 'bbb1', '2' => 'vvv3', 3 => 'ggg3', 4 => 'fgfgfgfg4'])
|
||||
->render();
|
||||
|
||||
$activeForm->field(class: Radio::class, name: 'nameee',params: ["style" => "color:RED;display:flex"])
|
||||
->setLabel("bbbbb")
|
||||
->render();
|
||||
|
||||
$activeForm->field(\itguild\forms\inputs\Select::class, 'ddd', ['value' => 2])
|
||||
|
@ -10,7 +10,8 @@ class Radio extends BaseInput
|
||||
use CreateOption;
|
||||
private $name;
|
||||
private $paramsArray;
|
||||
private $options;
|
||||
private $options = [];
|
||||
private $value;
|
||||
private bool $hasLabel = false;
|
||||
private string $labelTitle = '';
|
||||
|
||||
@ -27,8 +28,8 @@ class Radio extends BaseInput
|
||||
{
|
||||
$paramsString = $this->createParams($this->paramsArray);
|
||||
$optionsString = $this->createOption($this->options, $this->value);
|
||||
$this->html = "<input name='$this->name' type='radio' $paramsString>$optionsString</input>";
|
||||
$this->html = "<label>$this->labelTitle</label> $this->html";
|
||||
$this->html = "<option name='$this->name' type='radio' $paramsString>$optionsString</option>";
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user