symfony/symfony — Issue #3021: Dot in choice field type values
Author: KeiSamara
Created: 2012-01-03 14:25:19+00:00
State: open

The code below causes error:

Could not parse property path "notwork..c". Unexpected token "." at position 7
500 Internal Server Error - InvalidPropertyPathException

I combine several examples in one , to show what will work:

```php
$builder = $this->createFormBuilder();
$builder->add('availability', 'choice', array(
'choices' => array(
'notwork..c' => 'Next month',
'not work...' => 'Morning',
'not work.,.' => "Afternoon",
'not work. ' => 'Evening',
'work.c' => 'Next year',
),
'multiple' => true,
'expanded' => true,
));
```
In template: {{ form_widget(form) }}