Forum Academy Marketplace Showcase Pricing Features

Edit a type of thing temporarily (without writing to DB)

The website I’m trying to create is all about letting users create a collection of products. Other users can also see these collections, and make changes to them without affecting the original (basically personalising an existing collection to their own tastes)

As a new user to Bubble (and with a limited amount of previous technical exposure) I understand that it’s fairly easy to retrieve saved collections from a DB and save edited versions to a DB. However I want these collections to be editable and previewed before saving to the DB. The collections are very visual, so users need to view the potential changes before they save.

I’m attaching a wireframe which shows an existing collection of products at bottom of page, and choices of new products at the top. The idea is that when user clicks through on a new product they’re be taken to a page which shows more details on the new product + preview of how the new collection will look at the bottom of the page.

Help appreciated!

Hey @nickwhiteishere,

A few ways to do this, especially with custom states if you don’t want anything saved yet, but I’m going to offer a (hopefully) easier suggestion first solely based on your mockup …

The collection lists at the bottom would translate to repeating group elements. Let’s say you have a field under the User type called Collection. This field is a list and the field type is Product, a separate data type. So a User’s Collection is a list of Products.

The existing Collection list would mean your RG’s source is the “current user’s Collection”. The amended list source would be “current user’s Collection :plus item Current Page’s Product”

What that does is simply change the list of Products the repeating group is displaying. It doesn’t modify the database at all. Instead of retrieving just the user’s collection (a list of Products), it retrieves that PLUS the product being detailed on this page.

If the user decides to add the product to the Collection, then you can create a workflow off a button click on that page: when button is clicked > make change to current user: Collection add current page’s Product. And now, the existing list will contain the new product.

Hopefully this gets you started!


Gaby | Coaching Bubble

2 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.