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

@@ -124,9 +124,10 @@ class CustomFieldText extends AbstractCustomField
->add(self::MAX_LENGTH, 'integer', array('empty_data' => 256))
->add(self::MULTIPLE_CF_INLINE, ChoiceType::class, array(
'choices' => array(
'1' => 'Multiple boxes on the line',
'0' => 'One box on the line'
'Multiple boxes on the line' => '1',
'One box on the line' => '0'
),
'choices_as_values' => true,
'label' => 'Box appearance',
'expanded' => True
))