I have an app that allows people to add each other as friends. Is it possible do it through text input?
For example a user types a name into text input box. If that name exists, the friend is added.
I can only see an option to add friends from a list or new user.
Add a text component and a button right below your text input. Select both text and button and make a list of users. Set the visibility of the list to “Sometimes visible” if the input is not equal to empty. You can also filter this list to the users not on the logged-in users’ friend list (to hide those that are already friended). Also filter the list where the Current users > Name contains Input. Set the maximum items to 1.
Click on the text component within the list and set it with magic text to “Current user > full name”. Click the button within the list and set the button’s text to “Add friend”. Set your custom action that adds them as a friend to this button.
Alternatively, if you want to do this with ONLY a text input (no names/buttons) you can do the same thing but instead of putting a text component and a button, use a countdown timer. Although this does not seem like a good idea (users may end up having a ton of random friends just because they start to type)… here’s how it can be done.
So right below your text input, place a countdown timer. Create a list from this countdown timer. Set the visibility of the list to “Sometimes visible” if the input is not equal to empty. Filter the list where the Current users > Name contains Input. Set the maximum items to 1. Last, click on the timer within the list, set the timer to however many seconds you want, and set the countdown finished action to add the current user to the logged-in user’s friend list.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.