Skip to content

Commit bdd83e4

Browse files
bug #28469 [Form][TwigBridge] fix not displaying labels when value is false (xabbuh)
This PR was merged into the 4.1 branch. Discussion ---------- [Form][TwigBridge] fix not displaying labels when value is false | Q | A | ------------- | --- | Branch? | 4.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #28198 | License | MIT | Doc PR | Commits ------- c4a6c9fa00 fix not displaying labels when value is false
2 parents d9a1fe3 + 04162b6 commit bdd83e4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Extension/Core/Type/DateTimeType.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ public function buildForm(FormBuilderInterface $builder, array $options)
120120
'invalid_message_parameters',
121121
)));
122122

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

0 commit comments

Comments
 (0)