My users have a top 10 food list on their profile. I have it set up where they edit each input line item individually, and it updates their profile top 10. If they have a new #1 food, then they have to retype #2-10 basically. What would be best for the option for them to either re order or drag and drop to change order of their public list? once re ordered it would have to automatically update user data. Any help is much appreciated! -Zach
What’s your data structure right now? Is it purely just a list stored of another type, or is it 10 fields under the user?
Its 10 fields under the user data. Heres a screenshot of the page. I know theres probably a more elegant way to go about it thanks!
Yea since it’s individual fields it’s not really flexible with re-ordering, etc. You could make a separate data type called “Favorite Food” and store a list of that under the User. There’s probably a few ways to do it. One way would be install the ListShifter plugin and there’s an option to re-order items in the list. You could put up/down arrows in the cell to trigger those workflows. On user creation you would want a workflow to create 10 blank favorite foods so they are pre-made, just the text and order need to be modified.
Or you could probably use ListShifter but just reorder a list of texts instead of a whole new datatype. You would then need a button or something to “add” a new favorite food until it hits 10 total.
Or the non plugin way would be:
Add a “order” field as a number to the datatype. Then have up/down arrows in the cell, if you push the up arrow on item 4 for example, the workflow would change the current cell’s Favorite Food’s order to the average of items 2 and 3.
Ok perfect thank you so much!!
Bubble also makes a Drag n Drop plugin you could incorporate but the arrows might keep it simple for now