Autocomplete Search Results Select

Hi
I have put together an autocomplete for a search input.

At this point I want to make it so that when the autocomplete results appear, the user can click on the result and it will subsequently fill in the search input with the value of the cell clicked.

I have attached an image of the page functioning. What I’d like is to make it so a person could click on boston and the input value would be changed from b to boston.

Cheers

2 Likes

Are the images so important to the search, that you can’t use the built in Autocomplete ?

That does what you want it to do.

Hi Nigel,

The built in autocomplete is being used. It is a plugin and is functioning correctly, despite the image being present in the results. This is because the image is in the repeating group next to the text. So when the current cell is displayed it shows the image and the text associated with the city name in the database.

What I am having difficulties with is making it so that a user can click on the cell in the repeating group of the city name so that the name of the city could then be automatically passed to the input field.

For example, a user inputs the letter B and then three different cities are displayed that start with the letter B. Instead of needing to fill out the remainder of the text in the input field, I’d like for the user to be able to select the name from the list which will then get displayed in the input field. So they click Boston from the list and then Boston will be displayed in the input field.

I see, gotacha.

What you can do is put the input in a group, then set the input’s initial value to be the group’s value. Initially it will be blank, but when they select something you can set the group value and then reset the input.

Thanks Nigel! Worked like a charm.

I have attached photos for future users who may have the same issue.

4 Likes

Hi @boston85719 Can you help me please? it doesn’t work with me. I’ve search for 3 days. I desperate!
We can do it va Skype if you want?

Thanks in davance.

@NigelG Hi. Can you help me please? I’ve search for 3 days and I am desperate.

Thanks

I looked at your editor and really have no idea what it is that you need the help with…if you explain a bit more I might be able to understand where you are having difficulty…One idea without seeing much is that you might not have all the potential selections saved in the database.

In my case I have cities as the possible selections. In my database I have a table of all cities. This information is used to populate the repeating group that the user would see as the choices.

Hope that might help you.

For future posts, I have found that the more information provided in the form of text description of what you are trying to accomplish, as well as screen shots of areas from your editor you are trying to get the functionality to work and as you had opening your editor to others to view and edit. When I was able to be more clear and direct, a lot of the advanced bubble users were able to lend a helping hand.

1 Like

Hi @boston85719 i hope you are doing great , i am facing the same point here when i try to add the selected text ( from the search result ) to become an input value but unfortunately when i click on the current cell’s , nothing change to the input field ! i did the same solution you explained but nothing changed , i have tried to make a custom state also the input field didn’t change !! i am using this plugin: https://plugindemos.bubbleapps.io/version-test/searchdemo2?debug_mode=true , but when i try to select the result to become an input field it didn’t work kindly help me with that !
BR

I wouldn’t know what is wrong if you have followed the instructions without seeing your app.

I can’t get this to work… Did you place the input in a group by itself or with the repeating group results?

group by itself. If it was in the repeating group there would be an input in every cell.

Hmmm, I don’t get the option to add the current cell’ data from the search repeating group to pass it to the group…

I’ve tried pushing it into a custom state and holding it as a variable there, but that didn’t work either.

Does the field type need to be text? Or can it be a data type?

Managed to get it working by using “Display Data” and sending the “Current Cell’s Data Type” to the “Input’s Group”.

Hi!
I’ve tried to do that, but I don’t know what to write for display the data on the input group, could you help me?