diff --git a/src/Spryker/Zed/Customer/Communication/Form/AddressForm.php b/src/Spryker/Zed/Customer/Communication/Form/AddressForm.php index 11769267..be7db697 100644 --- a/src/Spryker/Zed/Customer/Communication/Form/AddressForm.php +++ b/src/Spryker/Zed/Customer/Communication/Form/AddressForm.php @@ -121,7 +121,8 @@ protected function addSalutationField(FormBuilderInterface $builder, array $choi $builder->add(static::FIELD_SALUTATION, ChoiceType::class, [ 'label' => 'Salutation', 'placeholder' => 'Select one', - 'choices' => $choices, + 'choices' => array_flip($choices), + 'choices_as_values' => true, ]); return $this; @@ -257,7 +258,8 @@ protected function addFkCountryField(FormBuilderInterface $builder, array $choic $builder->add(static::FIELD_FK_COUNTRY, ChoiceType::class, [ 'label' => 'Country', 'placeholder' => 'Select one', - 'choices' => $choices, + 'choices' => array_flip($choices), + 'choices_as_values' => true, 'preferred_choices' => $preferredChoices, 'constraints' => [ new NotBlank(), diff --git a/src/Spryker/Zed/Customer/Communication/Form/CustomerUpdateForm.php b/src/Spryker/Zed/Customer/Communication/Form/CustomerUpdateForm.php index 683b3ee9..a1168724 100644 --- a/src/Spryker/Zed/Customer/Communication/Form/CustomerUpdateForm.php +++ b/src/Spryker/Zed/Customer/Communication/Form/CustomerUpdateForm.php @@ -78,7 +78,8 @@ protected function addDefaultBillingAddressField(FormBuilderInterface $builder, $builder->add(self::FIELD_DEFAULT_BILLING_ADDRESS, ChoiceType::class, [ 'label' => 'Billing Address', 'placeholder' => 'Select one', - 'choices' => $choices, + 'choices' => array_flip($choices), + 'choices_as_values' => true, 'required' => false, ]); @@ -96,7 +97,8 @@ protected function addDefaultShippingAddressField(FormBuilderInterface $builder, $builder->add(self::FIELD_DEFAULT_SHIPPING_ADDRESS, ChoiceType::class, [ 'label' => 'Shipping Address', 'placeholder' => 'Select one', - 'choices' => $choices, + 'choices' => array_flip($choices), + 'choices_as_values' => true, 'required' => false, ]);