Modification inputText par CheckBox - PHP
Bonjour;
J'utilise le framework Silex. Et j'ai un input Text je voudrais le changer par une CheckBox a multiple choix.
Mon code est:
Code:
1 2 3 4 5 6 7 8 9 10
| $app->get('/Chart/{A}/{B}/{C}/{D}', function(Request $request, $A, $B, $C, $D) use ($app) {
if ($app['security']->isGranted('ROLE_USER')) {
///start form
$user = $app['security']->getToken()->getUser();
$form = $app['form.factory']->createBuilder('form')->setMethod('GET')
->add('Article', 'text', array(
'data' => '',
'required' => FALSE)) |
Je l'ai changé pour avoir une checkBox mais il m'a affiché une liste a un seul choix:
Code:
1 2 3 4 5 6 7 8 9 10 11
| ->add('Article', 'choice', array(
'choices' => array('A' => 'B',
'B' => 'B',
'C' => 'C',
'D' => 'D',
'OTHERS' => 'OTHERS'),
'required' => FALSE,
'empty_value' => 'ALL',
'empty_data' => NULL
)) |
Comment je peux le changer s'il vous plait ?
Merci.