Stop Auto Complete clearing input?

Is there a way to stop the Auto Complete from clearing if a non existing result is entered?

ie, sceanrio, you want an Auto Complete field in a form where a user is adding a new area which does not exist so no results are returned, but you want to add the new area so go to the next field in the form, as soon as you do this the Auto Complete field is cleared currently…

Can this be disabled? Reason being is the user wants to see if the ‘phrase’ (area in this example) exists and if it does it does not require entering a second time, if it does not exist accept the new ‘phrase’ (area) and continue with the form and don’t clear the Auto Complete field.

Could we use a modifier here, and if so what would we use?

Really hope that makes some sense!

:slight_smile:

There’s a dynamic event called ‘No Results Click’ which should give you what you need. I had a similar issues before this feature was added.

1 Like

Still clearing the Auto Complete. This is a new Dynamic Event to me. How would I use this event as I do not wish to fire any actions, just simply leave what is entered without clearing it? I’ve tried setting the value of the input to its own value but does not work. Still clearing…

I’ll let the team respond to this. My understanding is the input only actually stores the ID based on the autocomplete lookup so you can’t leave illegal input in there because it won’t have an ID.

1 Like

@sitestreet

Thanks for your input, really appreciated, hopefully will get an answer a little later on.

:slight_smile:

1 Like

Hmmm, maybe the second field could be a hidden field set to the value of the autocomplete field? Then on your insert use the hidden value for your value?

That’s similar to how I use it. I have the No Results Click event show a modal with a form to insert what has been entered and it works nicely.

App Connect Autocomplete 1.0.9

  • Updated autocomplete, added new noclear attribute which will keep the value typed

Yay! Thank you.

:smiley:

There’s a “no clear” option in the Autocomplete UI now, which allows you to leave the entered value in the input, when it does not exist.
You can use it in combination with the no results click event like you describe it in your first post Dave.

2 Likes