User dropdown as text

Hi all.

I currently use a standard SearchBox for visitors to search site users by username.

The suggestions work as intended, however, when a username is clicked it updates the SearchBox field but not as a text value. I know this as I pass the search value to a results page via URL which shows blank when I select an option from the dropdown list.

Any ideas on how to rectify this?


Hey @ben.j :wave:

If your SearchBox’s type is USER, it’s value will be a User.
What type of data are you trying to send to another page? And what is this page’s type (User, text, blank…)?

Can you provide more detais about this operation?

Hi @rpetribu, thanks for the reply!

Yep, the SearchBox is a User type. I’m sending the SearchBox’s typed text to a results page which then displays relevant users in a RG. The page type is blank.

I do this by sending the typed text via a URL parameter:

I tried initially sending the SearchBox value, however, this wouldn’t work for typed text.

I need a solution that handles if a user clicks on a user from the list, or just types text into the search box. I thought I could handle this by making the value of the SearchBox text which can then be handled by the URL parameter.

Does this make sense? Have I gone about this in completely the wrong way?

Thanks again for your help!

Why don’t you send the SearchBox Value Unique ID?
Then, in the other page, you can use this Unique ID to retrieve the user.

You want to send the “typed text” even if it results in an empty search for users?

The issue is that, yes, this is a search for a user but the searcher may not know the exact username of the person they’re looking for. I was thinking that by searching for a username and seeing those which contain the keyword(s) would provide a better UX - and that having the current users appear in a dropdown would help.

By having the searcher choose the User from the search results page (which contains more at-a-glance info about each user) it would also mitigate issues of choosing between users with similar usernames (knowing which one to choose from their bio or profile picture, for example).

Tldr; The SearchBox should not go directly to a User’s profile as I would like the results page to display all possible users containing the search query in their bio, username etc. This is why ideally I would like to take a User value and convert it to text so it can be used the same way a standard query would be.

If you think this is an insane way to handle this sort of request do say; I’m still new to Bubble and have no real UX design experience :sweat_smile:

We can sure think in a solution for this if you want…

But first, think with me…

I don’t think that make your visitor leave the page where he is searching and take him to another page with filtered users based on what he searched in the previus page makes sense :roll_eyes:

The best solution is to filter the users directly in the page where your visitor is. So he can decide what user he wants to view and then you can take him to the page of this specific user.

Do you have an example of what you are trying to do? A site with this feauture?
Can you share your app?

Maybe, looking into what you desire, we can provide better solutions :wink: