Skip to content

[Autocomplete] Implement re-using the same AJAX endpoint for TextType based field autocomplete #927

Open
@psihius

Description

@psihius

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 for text 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions