Forum Academy Marketplace Showcase Pricing Features

Clicking an image changes it's data source

Hi there,

is there a way (work flow/condition/…) to get the following to work?

–> If an image is clicked, it’s “content” (= the image itself) is being changed.

Any ideas?

Thank you! :slight_smile:

When image is clicked > make a change to Thing (with image value that stores this image) > image = new image (can be a dynamic value)

For example:

When profile picture is clicked > make change to current user > profile pic = new pic

But how does this work if I’m using an entry mask with different fields. I plan to build the following:

There should be a “presence list” with there options: Present, Unpresent, doesn’t exist
These three options should be shown by three icons (already created as PNG images): Green check mark, Red cross, grey circle.

Now the problem:
I work with a popup to save the entry.
In the popup you enter i.e. the title and information and by clicking “Save”, a new thing is created with the information inside the popup.

So how can I build such a “triple-checkbox”? Your solution only changes an existing thing, but in my case I need to declare the image source before a thing is created.

Hopefully you understand… :wink:

Thank you very much!

Redards,

Luka

So, depending on which option is currently true for the user, the action is different right? If present > replace, if not present > add, if it doesn’t exist > create. Is this right?

Or is the user declaring what it true for them first? They see 3 options and they pick 1 and then go from there?

What we’re building is an archive for about 600 music scores. In each scores there are different voices for different instruments (drums, trumpet, clarinet,…). We need to get an overview whether the score is complete or not. The problem is that in some scores some instrument parts just don’t exist. Declaring them as “missing” would be wrong, because something that doesn’t exist can’t be missed, right? :wink:

In our entering form you enter the score title, the composer,… and then you click “Next” and a popup shows up with a list of all possible instrument parts. For each instrument part you now have to chose one of those three options (present, missing, non-existing). And then you click “Save” and a new thing is created.

THat’s the plan. :slight_smile:

Ah, context helps :slight_smile:

Ok, so I think the best way to do this is have a radio button for each instrument with three options. That element makes it so that the user can only choose 1 of 3 options. For example, if in that next popup step, you have a repeating group to list all instruments, add 1 radio button element in the cell with static choices: Present, Missing, Does Not Exist.

This is where I’m going to suggest an approach to save, but you can correct me if it will not work with your structure…

Let’s say your score contains 3 fields: Present Instruments (list of texts), Missing Instruments (list of texts), Non-Existing Instruments (list of texts). Side note: these could also be list of Instruments if you have that as a separate data type.

Making a radio button selection adds that instrument to 1 of 3 custom state lists on your page. These custom states are all text lists - again, 1 for each option. E.g. When radio button is selected and the value is “Present” > Set state “Present” = State Present :plus item current cell’s text. You’re adding the current cell’s instrument text to the custom state list labeled Present. Set this up for the other 2 options.

Then, when the user clicks Save > Present Instruments field = Custom State "Present; Missing Instruments field = Custom State “Missing” … etc. Maybe you don’t even need to have a non-existing field if that’s kind of irrelevant data. But that’s up to you.

Recap: User makes radio button selections for each instrument > those selections get saved in 1 of 3 custom state lists > those custom state lists then get saved to the corresponding fields in the database in the creation of Thing (score) action.

Would this work for you?

@romanmg
Thanks for your help! Radio buttons seem to be a quite good solution. But the list structure doesn’t work for me, because I need to display exactly the same list (from the entry popup) on a printable page. I’m new to Bubble so correct me if I’m wrong.
There is another argument that does not fit the radio button solution: It just takes to much place.
Is there no way to change images by clicking them and send the shown image to a thing’s field?
So in my head there’s the solution that we’ve got those three pictures (green check mark, red cross, grey circle) and we can change them by clicking the icon. So there is only one icon shown. If I click the green check mark, the red cross is shown. If I click the red cross, the grey circle is shown. If I click the grey circle, the green check mark is shown. It’s kind of a loop.
My problem is to send/save the information which of these three icons is currently shown for the instrument. Any idea?

Anyway: Thank you so much for your help! :slight_smile:

Regards,

Luka