FriendsOfSymfony/FOSUserBundle — pull request #1021 by Bendihossan (2013-03-06 10:26:42+00:00)
Title: Allow changing form template by setting compound to false in default options

Currently if I extend a FOSUserBundle Form Type I can't modify the form template as well as Symfony will throw an error: ``Variable "compound" does not exist in form_div_layout.html.twig at line 224``. An example of wanting to modify the form is to [add an asterisk to required form fields](http://symfony.com/doc/2.1/cookbook/form/form_customization.html#adding-a-required-asterisk-to-field-labels) to indicate it is required.

The fix for this is documented in the [Symfony 2.1 changelog](https://github.com/symfony/symfony/blob/master/UPGRADE-2.1.md) which is to set ``compound`` to false in the ``setDefaultOptions`` method:

```php
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'compound' => false,
));
}
```

However if I do this on my custom form type it will throw a different error: ``You cannot add children to a simple form. Maybe you should set the option "compound" to true?``. So this change must be made on the FosUserBundle form types.