Add extra text in switchinput

Web Tips Q & ACategory: Krajee PluginsAdd extra text in switchinput
alexei_91 asked 5 months ago

HI, maybe I am to nob to see it, but I have a question, if I want to use  widget SwitchInput with  

'type' => SwitchInput::CHECKBOX,

with no model use, in next way, when I switch the position of the button I want to have word enable stay just without background color. How can I do this ? is it with css some how?
Or where I can find some documentation for this?
this the code witch I use to call it. 

echo SwitchInput::widget([
'type' => SwitchInput::CHECKBOX,
'value' => $status_val,
'name' => 'switch',
'attribute' => Yii::t('api_token', 'status'),
'options' => [ 'id' => '101', ],
'pluginOptions' => [
'onColor' => 'success',
'offColor' => 'danger',
'onText' => 'enable',
'offText' => 'disable',
],
]);

Login or register to contribute or comment.

Login   Register