Skip to content

Commit 0a47429

Browse files
author
Leny BERNARD
committed
Merge pull request #19 from LoicGoyet/master
Fix form by adding `'choices_as_values' => true,`
2 parents 80ef319 + 6871410 commit 0a47429

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Form/WidgetImageType.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
5555
'widget_image.form.hover.choice.popover.label' => 'popover',
5656
'widget_image.form.hover.choice.tooltip.label' => 'tooltip',
5757
],
58+
'choices_as_values' => true,
5859
'attr' => [
5960
'data-refreshOnChange' => 'true',
6061
],
@@ -99,6 +100,7 @@ protected function manageRelativeFields(FormInterface $form, $hover)
99100
->add('placement', ChoiceType::class, [
100101
'label' => 'widget_image.form.placement.label',
101102
'choices' => $positionChoices,
103+
'choices_as_values' => true,
102104
]);
103105
} elseif ($hover == 'tooltip') {
104106
$form
@@ -109,6 +111,7 @@ protected function manageRelativeFields(FormInterface $form, $hover)
109111
->add('placement', ChoiceType::class, [
110112
'label' => 'widget_image.form.placement.label',
111113
'choices' => $positionChoices,
114+
'choices_as_values' => true,
112115
]);
113116
} else {
114117
$form

0 commit comments

Comments
 (0)