Hey bubble community. I have a database which helps my clients create pdf documents from database items. I have a page that exports to pdf with text and images, which pull from my database and I am trying to figure out how to create a pop-up that will allow users to click on a photo and change the image (in the database and therefore on the page). The trick here is that I don’t want to use an image uploader. I want users to be able to search the images on the database and choose from those.
So far, I have successfully created a reusable pop up element which can search, filter, and preview images using custom states. The problem, however is in getting it to save the selected image that is selected in the pop up in the proper field. I can manage this if the pop up is not reusable and just manually tell it to save image to that specific field, but I need this to be repeatable and usable for every image on my page. Here is how it is currently setup:
This is the workflow for clicking the image (for clarity, we’ll call this “Photo 1”. Clicking Photo 1 on my pdf export page triggers a workflow to show the “search images” popup and then displays the data from Photo 1. Right now, the image is dynamic, pulling from the database item’s “photo 1” field.
This is the workflow for my reusable popup element, which is content type: image. In this popup, I have a repeating group of images and when the user clicks an image, it triggers this workflow, which sets the custom state “selected image” to the image clicked and displays that image below.
This is the workflow that should save the “selected image” back to the database. The problem here is that I want to save it to its parent group, which would be whatever image the user had originally clicked to pull up the pop-up. I think that explains it clearly. any help would be great.