File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -135,19 +135,19 @@ Grouping Options
135135
136136You can easily "group" options in a select by passing a multi-dimensional choices array::
137137
138- $builder->add('stockStatus', 'choice', [
139- 'choices' => [
140- 'Main Statuses' => [
138+ $builder->add('stockStatus', 'choice', array(
139+ 'choices' => array(
140+ 'Main Statuses' => array(
141141 'Yes' => 'stock_yes',
142142 'No' => 'stock_no',
143- ] ,
144- 'Out of Stock Statuses' => [
143+ ) ,
144+ 'Out of Stock Statuses' => array(
145145 'Backordered' => 'stock_backordered',
146146 'Discontinued' => 'stock_discontinued',
147- ]
148- ] ,
147+ ),
148+ ) ,
149149 'choices_as_values' => true,
150- );
150+ )) ;
151151
152152.. image :: /_images/reference/form/choice-example4.png
153153 :align: center
You can’t perform that action at this time.
0 commit comments