How do I add an autocomplete field in a class that extends FormBase
?
I created a custom module, which uses a class that extends FormBase
. I want to programmatically create a form field that autocompletes the username from the user registered in the site.