You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to ask for help with implementation of your code.
I got stuck on the last point
Then just use the MakinaCorpus\AutocompleteBundle\Form\Type\TextAutocompleteType form type in your own form builders, and set the source class name as the source parameter for the form type.
In my controller I have : ->add('fullname', TextAutocompleteType::class, array('source' => TextType::class))
but I get error :
An exception has been thrown during the rendering of a template ("Symfony\Component\Form\Extension\Core\Type\TextType: cannot find class or service").
In the top of my controller I have already added lines :
use MakinaCorpus\AutocompleteBundle\Form\Type\TextAutocompleteType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
The text was updated successfully, but these errors were encountered:
Hello, I'm really sorry I didn't see your issue before (I wasn't watching my own project...).
The 'source' argument must be an existing class name which implements the \MakinaCorpus\AutocompleteBundle\Autocomplete\AutocompleteSourceInterface interface, and which must be registered as a service in your container with the 'autocomplete.source' tag.
There is no magic or dynamic other way of registering autocomplete sources, they have to exist into your container, and be public.
Hope this helps, please ask any further question if you need more help.
I'd like to ask for help with implementation of your code.
I got stuck on the last point
In my controller I have :
->add('fullname', TextAutocompleteType::class, array('source' => TextType::class))
but I get error :
In the top of my controller I have already added lines :
The text was updated successfully, but these errors were encountered: