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

ObjectSelect doesn't select default value if "size" attribute is used #405

Open
tad3j opened this issue Apr 15, 2014 · 1 comment
Open
Labels

Comments

@tad3j
Copy link

tad3j commented Apr 15, 2014

When I use ObjectSelect in combination with select's "size" (greater than 1), none of the options are selected inside select element when the value is null, even if "display_empty_item" is set to true.

When form validation fails and form is reloaded, the options are selected as they should be, so it looks like the problem only exists when select value is null.

Is this normal behavior?

Btw, if I use "$form->get('fieldset')->get('element')->setValue('');" after binding the empty option is selected as expected.

@Ocramius
Copy link
Member

@tad3j can you write a failing test for this?

@Ocramius Ocramius added the bug label Apr 16, 2014
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