I’m creating profiles for salons where the first thing at the top of the page is the main photo but I want to add multiple photo for people to scroll through. Like when you see a floating “+” on a picture so people can look at more photos of something. Like in a dating app or any marketplace. Is this possible? Or do I have to create an inline list or something?
You have 2 choices here. I’m assuming you’re using a linked Google Sheets for this, and you’re looking for a carousel (swiping to get to the next image).
1/If you have an upper limit of images, let’s say 3, you can show 3 image picker components in your edit screen so people can upload to 3 columns.
In your Sheet, put those columns next to each other and name them “Image 1”, “Image 2”, “Image 3”. Glide will read them as an array.
Use an image component and point that to the array column, it will generate a carousel for you.
2/If you want unlimited images, add a new table to store those images, having 2 columns: Salon ID (rowID of the salon) and image.
Add a form so the salons can upload those images, but this must be done one by one. Then in the Salons table, you create a relation using the Salon ID, make it multiple matches, return images through a lookup, then follow the same image component for carousel step I mentioned in step 1.
@ThinhDinh thank you for these options! I’ve been trying to figure out how to create option 1, the array column out of 3 separate image columns. It looks like there are several different options of array columns as seen in the first picture. Which one is the right option?
And will that also merge all of the pictures into 1 column? As I’m trying to duplicate something like the second picture (which is not my app, but looks a lot cleaner than several separate rows.)
I’m not sure you’re using Sheets or Glide Tables but you can have a read here.
If you’re using Sheets, as long as you put the columns next to each other and name them sequentially they’ll automatically convert to an array column. It’s not a column you add, Glide does it for you.
If you’re using Glide Tables, use a template column to join the images together in a comma-separated format (let’s say image 1, image 2, image 3), then use a split text column to split by the comma, it will also be an array you can use in an image component.
@ThinhDinh OK, I guess that’s why I’ve been confused because mine aren’t automatically converting. Perhaps it’s because my Google sheet is already uploaded onto glide?
In your Google Sheets (not in this data view), do you have those columns next to each other?
Omg duh. I did not. THANK YOU. That should fix it!
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.