Skip to main content
1 of 3
spacecodeur
  • 1.3k
  • 3
  • 32
  • 55

Add a "autocomplete" field in a buildForm

How add an autocomplete field in a class who extends FormBase ?

I created a custom module, in the custom module there is a "Form" file (a class who extends FormBase) In the form file, I want create programmaticaly a form element like a entity reference field (an autocomplete users list of the site)

How can I do that ? I search in the core, in the web...but I don't find how do that

spacecodeur
  • 1.3k
  • 3
  • 32
  • 55