Home › Forums › Autocomplete › Allo custom value in autocomplete text box
Tagged: autocomplete, custom value, localization
- This topic has 5 replies, 2 voices, and was last updated 8 years, 9 months ago by Dirk Loehn.
-
AuthorPosts
-
-
February 12, 2016 at 15:10 #10248
Hello Alexander,
is there any way to allow additional custom values in the autocomplete text box. Right now the autocomplete enforces the selection of an existing entry. In our Case we pull a list of suppliers for the autocomplete field, but would like to allow the user to type in a custom supplier name. If you do so now and leave the autocomplete field, the entry is deleted.
Is it possible to add such an Option, or is there an easy Workaround?
Thanks a lot,
Dirk
-
February 14, 2016 at 09:51 #10259
Hi,
Sorry, but this is currently not possible. I have just answered the same question hereI’ll try to get this added, but I’m a bit busy right now.
Alexander
-
February 19, 2016 at 01:01 #10326
See v1.4: https://spjsblog.com/2014/03/29/autocomplete-for-text-and-people-picker-fields/
Alexander
-
February 19, 2016 at 12:13 #10331
Works great with adding a new entry, thanks a lot!!!
One problem still is with localization.
E.g. if we set translated attributes like
if (lcid == 1031){
// GERMAN
spjs.ac.text = {“noItems”:”Keinen passenden Eintrag gefunden”, “noValidItems”:”Keinen gültigen Eintrag gefunden”,
“invalid”:”Auswahl ist ungültig”,
“moreItemsLabel”:”Es werden die ersten {0} Einträge angezeigt”,
“moreItemsMouseover”:”Geben Sie weitere Zeichen ein, um die Auswahl einzugrenzen”,
“searching”:”Suche nach: ”
};then entering an entry with no Match will result in deleting the entry.
We have used the setting:
“allowAddNew”:true, // New in v1.4
“isLookupInSelf”:false, // New in v1.4Apart form this its working great!!!
-
February 19, 2016 at 12:19 #10333
Hi,
You must update the “spjs.ac.text” object for 1031 to include the new key/value pair:"addNewItem":"Add {0} to the list?"
You find this in the description in the original article here (under “Override the labels and text”): https://spjsblog.com/2014/03/29/autocomplete-for-text-and-people-picker-fields/
Does this help?
Alexander
-
February 19, 2016 at 12:21 #10335
Wonderful!
works like a charm – Thanks
-
-
AuthorPosts
- You must be logged in to reply to this topic.