8000 [Form] [ChoiceType] Add placeholder_disabled option by radar3301 · Pull Request #47570 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] [ChoiceType] Add placeholder_disabled option #47570

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

Closed
wants to merge 7 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Form] [ChoiceType] Add placeholder_disabled to view.
  • Loading branch information
radar3301 committed Sep 13, 2022
commit dc61ecab6f02e0043b7dd87f506c47c167817663
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ public function buildView(FormView $view, FormInterface $form, array $options)
if (null !== $options['placeholder'] && !$view->vars['placeholder_in_choices']) {
$view->vars['placeholder'] = $options['placeholder'];
}

$view->vars['placeholder_disabled'] = $options['placeholder_disabled'];

if ($options['multiple'] && !$options['expanded']) {
// Add "[]" to the name in case a select tag with multiple options is
Expand Down
0