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.
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.
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.
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.
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