Skip to content

Commit c80e80b

Browse files
committed
Revert "[Form] Remove "value" attribute on empty_value option"
This reverts commit 9e849eb78bcc668a2b8aad39cb47e2ad32c73a47. Reasons for the revert: * symfony/symfony#8478 * symfony/symfony#8526
1 parent c5528ea commit c80e80b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Resources/views/Form/choice_widget_collapsed.html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?php echo $view['form']->block($form, 'widget_attributes') ?>
33
<?php if ($multiple): ?> multiple="multiple"<?php endif ?>
44
>
5-
<?php if (null !== $empty_value): ?><option <?php if ($required):?> disabled="disabled"<?php if (empty($value) && "0" !== $value): ?> selected="selected"<?php endif ?><?php else: ?> value=""<?php endif?>><?php echo $view->escape($view['translator']->trans($empty_value, array(), $translation_domain)) ?></option><?php endif; ?>
5+
<?php if (null !== $empty_value): ?><option value=""<?php if ($required):?> disabled="disabled"<?php if (empty($value) && "0" !== $value): ?> selected="selected"<?php endif ?><?php endif?>><?php echo $view->escape($view['translator']->trans($empty_value, array(), $translation_domain)) ?></option><?php endif; ?>
66
<?php if (count($preferred_choices) > 0): ?>
77
<?php echo $view['form']->block($form, 'choice_widget_options', array('choices' => $preferred_choices)) ?>
88
<?php if (count($choices) > 0 && null !== $separator): ?>

0 commit comments

Comments
 (0)