clevertech/YiiBooster

The last of the SwitchGroup elements wont render.

Closed this issue · 2 comments

Hi,
This issue is similar to the one regarding the Select2's CSS selector, but in this case only the last Checkbox won't render.

this bug can be solved by adding "input" to the CSS selector in TbSwitch.php at line 80

    echo "$('#$id').bootstrapSwitch({$config})"; 

must be changed to
echo "$('input#$id').bootstrapSwitch({$config})";

and the problem is solved.

sincerely
Babak

@bandpay
how can I duplicate this error ... I have a form with two switch groups ... and everything is working fine!

Hello Amr,
I believe that this has been fixed
The solution was to put 'input' before the 'ID' as in this case input#$id
same error was also present when rendering Select2 and it needed a 'select' before 'ID'

Have a nice day 👍