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' )