Button will not trigger event

Hey all,

I’ve run into a problem that seems like a bug because what I’m trying to accomplish is fairly simple.

So I have a repeating group and I want users to be able to select a cell by clicking on it. I created a transparent button that overlays each cell and created a workflow for those buttons:


To show that the cell has been selected, I added a box-shadow:

Now I thought it should be working after this however it isn’t. I spent an hour troubleshooting to no avail, however, I found that if I went into the database and manually made the item’s “selected?” field = “yes”, the box-shadow would appear on the group, and if I clicked it the shadow would disappear and it would successfully set “selected?” to “no”.

So pretty much, my workflow only works when the item is already selected, but won’t work when it is not selected, and I don’t know why.

I’d really appreciate any help! Thanks.

  • Kalvin

I think you could make this much easier by getting rid of the transparent button, and just using “onClick” event of a group within the cell. And second part is rather than use the database to store the temporary state of “selected” - perhaps consider “custom states” instead?

Just an overall simpler approach to do this standard type of thing in Bubble - in my opinion.

2 Likes

:raised_hands: Facts. Not opinions.

:grinning:

1 Like

The button was so that I could get the inset box-shadow to be in front of the elements. I looked more into making it work with states and came across this super helpful link:

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