AjaxSelectWidget for TextField (Plone 6 Classic)

Is it possible to use 'plone.app.z3cform.widget.AjaxSelectFieldWidget' for a TextLine field? (if yes, I assume one has to do it 'py', not 'xml' (?)

Usecase:
Text Field has 'contact person'. Contact person can be 'anyone', but it would be useful if there was a way to 'find fullnames of users'

I currently have used Choice, but now my customer want it to be possible to add 'none users'. (in other words: Just write a name).

Current code (simplified)


<field name="contact_person" type="zope.schema.Choice">
  <vocabulary>plone.app.vocabularies.Users</vocabulary>
  <defaultFactory>>My.Addonn.current_user.getUserId</defaultFactory> 
</field>

Update: It seems like it can be done (at least 'with py') something like this, but not sure how to limit entries to 'just one' (allow multi does not work, AjaxSelectWidget limit 'lenght'):

teste = schema.TextLine(
    required=False,
)
directives.widget("teste",  AjaxSelectWidget, allowMulti=False, vocabulary= 'My.Addon.FullnamesVocabulary' )

Depending on your plone.supermodel version you can define the widgets also in xml. See the docs here Widgets – Backend — Plone Documentation v6.0

(I have defined other widgets in XML, but)

I am not sure how one can define the vocabulary, I tried things like:

   <field name="something" type="zope.schema.TextLine">
       <form:widget type="plone.app.z3cform.widget.AjaxSelectWidget" vocabulary="DocentIMS.ActionItems.FullnamesVocabulary">
       <vocabulary>plone.app.vocabularies.Users</vocabulary>

      </form:widget>
    </field>