sonata admin not mapped field with ModelAutocompleteType

18 Views Asked by At

is possible to add virtual field like that

 $form->end()->with('actions',[ 'class'=>'col-md-4'])
            ->add('addToRecipe',ModelAutocompleteType::class,[
                'required'=>false,
                'mapped'=>false,
                'class' => 'App\Entity\Shopify\ProductVariant',
                'property' => 'title', 
                'admin_code' => 'app.admin.product.variant',
            ])
        ;

this example throw

The current field `addToRecipe` is not linked to an admin. Please create one for the target model: ``.
0

There are 0 best solutions below