I’m having a problem displaying multiple images in a repeating group. I was able to save the images to the database. But displaying it in the user dashboard is proving to be a problem. I’ve tried various approaches but it’s not working.
As you can see in the dashboard screen below, there are 2 repeating groups and a group involved. The dashboard itself is a repeating group (#1); the Trip Documentation is a group to hold the repeating group where I intend to display all the photos (#3).
This is the database view with the data type and fields I created to record the photos:
These are the steps I followed to display the images (and it didn’t work):
- Note: the page data source “valets”. So I set the data source of the group to “Current cell valet”
- This is what I set for the repeating group in the “Trip Documentation” group:
- I added an “image” element in the repeating group, and this is how I set it:
The images are not being displayed. For each valet/trip, I’d like to be able to display all the trip photos (in the user’s dashboard) as part of the documentation.
Well according to your screenshot you are storing a list of photos under Trip Documentation, meaning inside that Trip Documentation cell you need another repeating group with the data type “image” and the source being
Current cell's Trip Documentation's Pre photos since you need to show multiple
Although it seems like you want a group showing a single Trip Documentation, and that repeating group is the image actually the one I described earlier?
Thanks. If you look at the screenshot under #3, I do have a repeating group in the “Trip Documentation” group. I thought about using constraints to control the display, but it didn’t work (see #2).
Right but you are storing a list of images under a single Trip Documentation, so you need a repeating group with the type “image” showing that list. Then inside the cell you put the single image element showing Current cell’s image.
This right here would show multiple Trip Documentations
So you would need another RG inside that cell showing the list of images for that specific Trip Documentation
Of course from a UI/UX perspective now the images are literally tiny, but at least see if that’s what you needed then you can change it up and add arrows or something to go through each Trip Documentation one at a time.
You mean to add another RG into the RG that is already in the “Trip Documentation”…like this?
Then that tiny row in my picture would need an image element inside it, leading back what I was saying maybe rethink how the user scrolls through these images since it’s tiny
Unless your database needs tweaking and you just want to store one Pre image, and one Post image per documentation?
Image element inside the cell
I would imagine with having multiple Trip Documentations, with multiple images per Trip Documentation, you would want something like this:
This is the same structure you have and with the nested repeating group’s I described just in a different layout so the user can “arrow” to an older one and scroll to see more photos
Ok thanks. Let me give this a shot and we’ll see how it turns out. Lol!
Happy New Year! I like the result you had and the scrolling feature as well. But I wasn’t able to arrive at the same result you had; and I think it’s more about the way I’m using the “data type” and “data source”. So, I would like to walk you through a few steps of what I’ve been doing to see if you can identify where I’m going wrong:
- The page itself is set to “valet” (which is the same as trips). Here we search for all valet (trips) created by the user). This is the user dashboard, pretty much.
Then we added a group to the page to hold all documentations related to the trip. Again here, we set the group data type to “valet” and the data source to the current cells valet.
We then put in a RG in the “Trip Documentation” group (1st RG). I selected “Trip Documentation” as the data type for this RG, but Bubble deemed that to be an error and prompted me to change it to image.
After changing the “data type” to image, I am able to set the source to this.
- So, I put in an RG in the cell of the 1st RG (as you suggested). But as you can see, when I do that, I don’t get the options in the drop menu to set the data source the way you did it in your example (on the right). So, I get lost here before I can even add the image element to get to the same outcome you got. But also, the settings you have for “data type” and “data source” (in the small RG) are the same settings that bubble suggested in step 3.
So, I think if you can help me sort out these data types and sources, I should be able to do this.
In the Valet datatype are you just storing a single Trip Documentation? Previously I thought you were searching for Trip Documentations with a constraint Valet = Current cell’s Valet.
I’m storing multiple images within a single trip documentation; I’m uploading multiple images in a database field. These are the images I’m trying to display in the trip. There will be other documentation, including comments, etc. But those will be in a different group (within the trip documentation). So, for now, we’re just working on the images part.
So in in step #2, when I search for trip documentations, using the constraints of current cells valet, I get this (so I selected first item):
And I set the main repeating group to this:
After this point, I cant seem to get the nested RG correct
When you do :first item you’re losing all the other Trip Documentations and just showing the first one. Are intending to do that? If you want multiple at once (or that example I made where you arrow between them) you need a Repeating Group to show multiple like your original post.
This topic was automatically closed after 70 days. New replies are no longer allowed.