Skip to content

Custom Many To Many and Select2 #159

@ndoulgeridis

Description

@ndoulgeridis

Hello,

I have successfully created a form of type afe_select2_entity with 2 entities having many-to-many relationship by doing:

 $builder->add('foo', 'afe_select2_entity', array(
        'class' => 'Foo\FooBundle\Entity\Foo',
        'multiple' => true,
        'label' => 'field.foo',

    ));

Now I have following entities:

  1. Category
  2. CategoryHasType
  3. Type

How now from category form type embed a form to select types from Type entity and has afe_select2_entity styling? (autocomplete and boxes with icon to remove on selection)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions