3. Search for a Conversation
Last updated
Last updated
Users can search for a Conversation by entering a friend's first name, last name, or full name into either the Input Search Conversation (Desktop)
element or Input Search Conversations (inside Floating Group - View Conversations)
element.
When either of those inputs are not empty, the Repeating Group Conversations (Desktop)
or Repeating Group Conversations (Mobile)
elements will only display the Conversations whose "participating Users" field (type: User, list: yes) contains Users with the searched for name. This is accomplished by using the conditional statements (below) which change the data source of the repeating groups when either of the inputs are not empty:
Desktop
Mobile
Bubble's search functionality is case-sensitive in this scenario, which we don't want here. For example, if a User types "lauren" into either of the search inputs, Bubble would only return Users with the name of "lauren" not "Lauren". The workaround used in the template uses two hidden inputs:
1. Input Lowercase (Input Search Conversation (Desktop)
2. Input Lowercase (Input Search Conversation (Mobile)
These hidden inputs' initial contents are the Input Search (Desktop) and Input Search Conversations (inside Floating Group - View Conversations)
elements' values, set to :lowercase. This way, the advanced constraints in the Repeating Group Conversations elements take the lowercase values of the Users' names and compares them with the lowercase value of what the Current User typed into the Search inputs. This returns all Users with the matching names regardless of whether the input value is capitalized or not:
Desktop
Mobile