Dual Function Search Bar - can it be done?

Hello, I have been struggling with coming up with a dual function search bar. I am wondering if anyone has a solution. Here is how I would like this to function:

  1. Search for a contact in the database by typing in the phone number in a search bar.
  2. If the contact is in the database, display the phone number - possibly in a repeating group or other form of dynamic text so it can be edited if necessary. I like using the pencil icon personally.
  3. If the contact is not in the database, display the typed text - possibly in another repeating group or some other dynamic format to display typed text - and allow the contact to be added to the database. The add contact button could then take the newly created contact’s stored info - ie, phone number - to the edit page where more info could be filled out.

Hopefully this makes sense and someone can come up with a good solution. Thanks in advance!

What you’re looking for is the SearchBox with “Allow entries not in list” enabled. This will let you use the value “SearchBox’s typed text” in addition to “SearchBox’s value”

05-08-36-11


Gaby | Coaching Bubble
Private coaching, courses, and tons of free resources

1 Like

Thanks Gaby! This works nicely for getting the input text to populate so this is definitely helpful. The current roadblock I am encountering is when I try to use navigation to take the user to the contact page where the user can add more info on the contact they just searched.

What I am struggling with is how can I get bubble to pull that input text value and classify it as a phone number and have it pre-populate in the contact page? Right now when I navigate I ask bubble to send over the contact info but I suspect the issue is trying to assign that input text as data that should populate the phone number field.

Bubble has been very intuitive, this has been the one issue that has me completely lost. I keep going around in circles. Is it possible to do this? I think so but I cannot figure out a way to make it work.

Thanks again, I appreciate the help!

OK I think I have it figured out. I was making it more complicated then it needed to be. Just using a simple search field tied to the phone number and then redirecting to the profile page works perfectly. I’m confident I can get this worked out from here.

Thanks for pointing me in the right direction!