Open psihius opened 1 year ago
I recently had the need for a similar field :
__toString()
+ Some requirements asking for ability to configure said field :
__toString()
: in my implementation, we're using ExpressionLanguage) Yea, I like this idea too.
Thank you for this suggestion. There has not been a lot of activity here for a while. Would you still like to see this feature?
Friendly ping? Should this still be open? I will close if I don't hear anything.
It seems to me that this is still relevant (?)
Right now you are required to make your own autocomplete endpoint when using a TextType field (as per documentation and in practice). In many cases all you want is just the data to be stuck into the text field - in my case, it's a company name. So you can reuse the same entity lookup code, just return the same data for the
value
that is returned fortext
in this case.I have a table where I import on daily basis the registry of all active companies for my country, it's used as a dictionary for autocomplete to speed up the lookup and reduce mistakes by users, I can also pre-fill some other fields in the form by doing some JS (like pre-fill company address, registration data, etc), but it also allows entering anything into the field (an international company for example) - I do not need strict entity validation on the backend, nor do I even want to link to that dictionary table - I am creating an actual proper company record from the form that's being filled in.