diff --git a/Form/Type/Select2CountryType.php b/Form/Type/Select2CountryType.php index 7887ec898..48a921b58 100644 --- a/Form/Type/Select2CountryType.php +++ b/Form/Type/Select2CountryType.php @@ -82,7 +82,7 @@ class Select2CountryType extends AbstractType $resolver->setDefaults(array( 'class' => 'Chill\MainBundle\Entity\Country', - 'choices' => $choices + 'choices' => array_combine(array_values($choices),array_keys($choices)) )); } } diff --git a/Form/Type/Select2LanguageType.php b/Form/Type/Select2LanguageType.php index ab92466cb..42a0f74cd 100644 --- a/Form/Type/Select2LanguageType.php +++ b/Form/Type/Select2LanguageType.php @@ -79,7 +79,7 @@ class Select2LanguageType extends AbstractType $resolver->setDefaults(array( 'class' => 'Chill\MainBundle\Entity\Language', - 'choices' => $choices + 'choices' => array_combine(array_values($choices),array_keys($choices)) )); } }