Reputation: 5241
I making a form which represents project. I'd like to make a field with autocomplete option, for example when I make new project and entering the name of the project lotus will look in existing projects (specified column in view) and suggests name. I need it to prevent creating two projects with same or similar name in user friendly form. Thank you.
Upvotes: 0
Views: 910
Reputation: 3524
If you want to avoid duplicate names, @dmytro's solution will actually suggest to enter existing names, what may be confusing to users.
What I would do is to lookup similar project names (anyone remembering @Soundex?) and show in computed for display field under the editable field. Only caveat: it will not refresh as user types in, and you need to refresh form to trigger the lookup.
You should also validate your form and do not allow to save it with existing project name (unless it is the same document - compare looked up UNIDS).
Upvotes: 0
Reputation: 5429
You can do that by adding field with type: Dialog List (with option Allow values not in llist) and as a possible values put
@DbColumn(""; ""; view_name; column_number)
Upvotes: 4