Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple checkboxes return wrong values #1

Open
Squareseidh opened this issue Dec 8, 2017 · 0 comments
Open

Multiple checkboxes return wrong values #1

Squareseidh opened this issue Dec 8, 2017 · 0 comments
Assignees
Labels

Comments

@Squareseidh
Copy link

Squareseidh commented Dec 8, 2017

Hello

When I construct my form, I declare this :

$formService->add(new Choice('type', ['required' => false,
                                                  'choices'  => [0 => 'test1', 1 => 'test2'],
                                                  'expanded' => true,
                                                  'multiple' => true]));

Which created this in html

<input id="service_type" name="service[type][]" class="custom-control-input" value="1" type="checkbox">
<span>0</span>
<input id="service_type" name="service[type][]" class="custom-control-input" value="1" type="checkbox">
<span>1</span>

But "test1" et "test2" in choices arrays are never used

For me service[type][] must be service[type][test1] and service[type][test2] and before i think it was like that because before this system worked

@ElGigi ElGigi added the bug label Feb 14, 2018
@ElGigi ElGigi self-assigned this Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants