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

Choice reverse key / value #2

Open
Kaaly opened this issue Feb 5, 2018 · 0 comments
Open

Choice reverse key / value #2

Kaaly opened this issue Feb 5, 2018 · 0 comments
Assignees
Labels

Comments

@Kaaly
Copy link

Kaaly commented Feb 5, 2018

I create a form like this :

$categories = ['Gestion', 'other' => 'Autre catégorie'];
$formProject = new Form('project_category');
$formProject->add(new Choice('category', ['label' => 'Catégorie', 'choices' => $categories]));

The result is :

<select id="project_category_category" name="project_category[category]">
                     <option value="Gestion">0</option>
                      <option value="Autre catégorie">other</option>
</select>

but it shoud be this :

<select id="project_category_category" name="project_category[category]">
                     <option>Gestion</option>
                      <option value="other">Autre catégorie</option>
</select>

Can you fix it please ?

@ElGigi ElGigi self-assigned this Feb 14, 2018
@ElGigi ElGigi added the bug label 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