braincrafted / bootstrap-bundle

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

Cannot use form extensions #456

Open NiKo2b opened 7 years ago

NiKo2b commented 7 years ago

Hello I have followed all the installation guide, but I have a problem using form extensions. I tried with form_actions and bootstrap_collection but I have errors like :

Could not load type "bootstrap_collection"

Is there something else to add ? I'm using Symfony 3.1

althaus commented 7 years ago

You have to use the FQDN since Symfony 3:

use Braincrafted\Bundle\BootstrapBundle\Form\Type\FormActionsType;

class FooType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('actions', FormActionsType::class);
    }
}