I’m struggling to accomplish something that I would have thought to be simpler and I can’t seem to find any examples on here.
I have a list of items that is the main content of the app. What I want to accomplish is to allow users to create multiple named lists of their favorited or bookmarked items. You see this sort of thing in many apps (AirBnB, for example lets you create multiple lists of favorites items with each list having a different name). I’ve created a table called user lists which I have successfully create a form to allow users to create named lists that only they can see. But haven’t figure out how to be able to create a form in which, while browsing the main list of items, they can click on it and add it to one of their lists.
This is close:
But this assumes only one list, (also, I don’t see how that’s functionally much different than the built in “Favorites” function, but maybe I’m missing something that would tell me how to use this to accomplish my goal). What would be an ideal expansion of what is described in that post is that the user clicks “Add to my lists” and can choose one of their existing lists to add the item to.
Any suggestions or links to other posts that I may have missed that describe how to build this functionality?
Thank you! That worked like a charm and I learned something in the process. I didn’t realize that the choice component writes the value immediately. It doesn’t need to be in a form with a submit button. Whoop!
But it did point up an additional issue:
This solution works great if each user only wants to put each item on one list. But I was hoping that “Item ABC” could be on User1’s “My First List” and also on “My Second List”. This solution only allows each user to have a given item on one list. Any ideas how to have the same item on multiple lists? Probably a tad more complicated…
Hey there - this was super useful, but unfortunately doesn’t quite work.
I have a main user list, and want them to select from a list of companies. Each has a profile and info and I want to let users toggle ‘Add to my list’ and from there they will then be displayed in their profile.
I can’t seem to get this to work but followed the above instructions.