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

placeholder text for select2 inconsistency #385

Open
briancappello opened this issue Feb 3, 2015 · 0 comments
Open

placeholder text for select2 inconsistency #385

briancappello opened this issue Feb 3, 2015 · 0 comments

Comments

@briancappello
Copy link

Getting select2 to use the placeholder text varies depending upon options passed into the form builder.

A "standard" config works like expected:

array(
    'empty_value' => 'Select a choice...',
    'choices' => array(...),
);

However, if the preferred_choices option is passed in, then this config is required:

array(
    'empty_value' => '',
    'attr' => array(
        'data-placeholder' => 'Select a choice...',
    ),
    'preferred_choices' => array(...),
    'choices' => array(...),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant