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

Empty label doesnt work correctly for ObjectSelect #483

Open
cbichis opened this issue Mar 9, 2015 · 1 comment
Open

Empty label doesnt work correctly for ObjectSelect #483

cbichis opened this issue Mar 9, 2015 · 1 comment
Labels

Comments

@cbichis
Copy link

cbichis commented Mar 9, 2015

On Form\Element\Proxy.php

    if ($this->displayEmptyItem) {
        $options[''] = $this->getEmptyItemLabel();
    }

Should be changed to:

$options[] = array('label' => $this->getEmptyItemLabel(), 'value' => '');

Otherwise the emptyLabel wont be displayed properly and rater a NULL is inserted as item...

@cbichis
Copy link
Author

cbichis commented Mar 9, 2015

Also, this seems to colide with emptyOption from Zend\Form\Element\Select which is adding the NULL actually...

@gianarb gianarb added the Bug label Apr 9, 2015
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