Forums

Autocompleter allow new entries?

megana 08 Dec, 2015
I have a form set up with a field using the Autocompleter action. It's all working well, except that sometimes users need to enter data that's not part of the autocomplete list. However, if they type in something that has no matches and then tab or click to a different field, whatever they had typed disappears. Is there a way to update the field so if they type something in, it just gets automatically added to the list of options so they can pick it?

It seems like this should be doable with JS, but not sure how. I was only able to get the Autocompleter working by very carefully following the instructions on this site, I don't really have a good grasp of how that code is working. Any help would be much appreciated!
GreyHead 08 Dec, 2015
Hi megana,

It may be possible with a different AutoCompleter but not with the ChronoForms one, This behavious used to be called a Combo box but the jQuery version seems to use that term for something rather different.

What you could do simply is add a second input after the autocompleter and invite people to add new values there. Then when the form is saved you can accept that value and save it to your database table for future use. BUT - in my experience this is an open invitation for you to gather a lot of typos, odd and mistaken entries which will then be offered to the next user in the autocomplete - use with great care!

Bob
This topic is locked and no more replies can be posted.