Skip to content

Commit 5a10f2d

Browse files
bug #28508 [Form] forward false label option to nested types (xabbuh)
This PR was merged into the 2.8 branch. Discussion ---------- [Form] forward false label option to nested types | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #28469 (comment) | License | MIT | Doc PR | This change does not fix any built-in Symfony form themes, but takes into account the changes made in #28469 to allow third-party form themes work properly. Commits ------- 3247cde forward false label option to nested types
2 parents b349b64 + 3247cde commit 5a10f2d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php

+5
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ public function buildForm(FormBuilderInterface $builder, array $options)
121121
'invalid_message_parameters',
122122
)));
123123

124+
if (false === $options['label']) {
125+
$dateOptions['label'] = false;
126+
$timeOptions['label'] = false;
127+
}
128+
124129
if (null !== $options['date_widget']) {
125130
$dateOptions['widget'] = $options['date_widget'];
126131
}

0 commit comments

Comments
 (0)