I want to Implement the following field in symfony2. It has 2 Radio Buttons, and they are styled like Switch using some bootstrap styling.
Example here
above html and bootstrap, snippet displays desired output
Код: Выделить всё
On
Off

for this example to work it requires tag inside tag.
but symfony form builder is rendering
Код: Выделить всё
..
Код: Выделить всё
Код: Выделить всё
In symfony for checkbox we use this code , but it displays normal radio group,
Код: Выделить всё
->add('check', 'choice', array(
'choices' => array(
0 => 'On',
1 => 'Off'
),
'expanded' => true,
'multiple' => false,
'data' => 1
))
Источник: https://stackoverflow.com/questions/271 ... controller
Мобильная версия