braincrafted/bootstrap-bundle — pull request #158 by squaye85 (2013-12-19 15:46:09+00:00)
Title: Add icons to form buttons

I don't really know how well to implement this better than I have done in this pull request, though I tested it and it would like a charm for me.

Usage:
In form class:

```php
$builder->add('register', 'submit', array(
'label' => 'Submit',
'attr' => array(
'icon' => 'fa fa-download'
)
))
```

In my case I'm using FontAwesome and passed the class of the icon from the FontAwesome documentation to the ```icon``` attribute. I haven't tested with Glyphicons, but i guess it should work.