I am a beginner on Bubble and want to make the users connect by each other as friends.
How can I build an add friends system and show the friend list on each user? There are few questions that I’m not understand.
- This is my data type for the user, is it okay to build an add friend system?
- I want to add friend by input the username in the input box and clicking the button “Add friends” as below. What workflow should I run for it?
Some videos said I need to make changes with both current user and my friends, how can I make it happen?
Lastly, I want to show my friend list. How to show my friends nickname on the repeating group?
Anyone can help? Thank you so much!
Sure you can.
Your data set up looks good.
When pressing the button create workflow:
Make changes to Current User
Change field: “Friends” → Add “Input Search by Nickname´s Value”
Make Changes to “Input Search by Nickname´s Value”
Change field: “Friends” → Add “Current user”
This simple set up will however make both users friends right away.
you might want to add a “friend request step” in wich you first add the two different users to a “Friend request” data field (list of users as well).
And not utnill the user press (accept_request) they will be added to the “List of friends” (and removed from the list_of_requests)
Oh! that’s good. Thank you for your help!!!
HI @Kackur ,
I have some more questions.
I tried to create workflow to button “Add Friend” , “Make Change to Current User”, the field “Friend add Input Search by nickname’s value” became red as below.
Am I made any mistakes? Thank you!
You haven’t added ‘value’ to the end of the expression…
Thank you! But it’s still in red.
Then it must be a ‘type’ mismatch…
What is the Type of the Search box?
EDIT: Ah, I see you’re using an Input element for this… I wouldn’t personally recommend doing that…
But if you really want to then you’ll need to do a search for Users and match the User’s username to the input’s value.
This topic was automatically closed after 70 days. New replies are no longer allowed.