fix deprecations: use choices_as_values=true and flip content of the choice options

This commit is contained in:
nobohan
2018-04-04 17:50:23 +02:00
parent 9951a5d765
commit 23dd4ec48b
6 changed files with 23 additions and 15 deletions

View File

@@ -254,7 +254,8 @@ class CustomFieldsGroupController extends Controller
'csrf_protection' => false
))
->add('type', ChoiceType::class, array(
'choices' => $fieldChoices
'choices' => array_combine(array_values($fieldChoices),array_keys($fieldChoices)),
'choices_as_values' => true
))
->add('customFieldsGroup', HiddenType::class)
->add('submit', SubmitType::class);