braincrafted / bootstrap-bundle

BraincraftedBootstrapBundle integrates Bootstrap into Symfony2 by providing templates, Twig extensions, services and commands.
http://bootstrap.braincrafted.com
MIT License
399 stars 184 forks source link

Form bootstrap_collection Twig #441

Closed 0xslipk closed 8 years ago

0xslipk commented 8 years ago

Hi,

I tried to add bootstrap_collection to form.

->add('pollOption', 'bootstrap_collection', array( 'type' => new PollOptionType(), 'allow_add' => true, 'allow_delete' => true, 'add_button_text' => 'Add', 'delete_button_text' => 'Remove', 'by_reference' => false, 'constraints' => new Count( array('min' => 1, 'minMessage' => '') ), ) )

and it seems ton throw a twig exception

An exception has been thrown during the rendering of a template ("Notice: Array to string conversion") in BraincraftedBootstrapBundle:Form:bootstrap.html.twig at line 788.