Assign value to checkbox and pop up checkout

Hey there,

I am trying to assign a value to checkboxes and found a thread that included most of the logic. It however didn’t work as I think Bubble has been updated a good bit since.

I need the checkboxes to be given a value, say ‘2’, and then for the Stripe checkout to tally up the number of boxes ticked and charge the user based on that.

Any help on it would be greatly appreciated.

Hey @luke1

Do you mean you want Stripe to charge the sum of the ticked checkboxes’ values? Or the number of checkboxes ticked?
i.e. if 3 checkboxes have value 1, 2 and 4 do you want Stripe to charge 7? or 3?

Hey @ambroisedlg, I can work with either! But for the MVP in your example charging 3 would be perfect. Thanks

@luke1 alright see this:

Preview: https://ambroisetestapps.bubbleapps.io/version-test/boxes-values?debug_mode=true
Editor: https://bubble.io/page?type=page&name=boxes-values&id=ambroisetestapps&tab=tabs-1

Oh didn’t know about the grouping option, that helped somewhat.

Does it work for repeating groups?

@luke1 check the editor again, I did it for a RG as well

Thanks @ambroisedlg that worked a treat!

Next is to ensure that those that have the checkbox ticked are sent an email when the ‘send/submit’ button is clicked at the end.

I’ll give it a go first and may get to the bottom of it.

Thanks again!

1 Like

Welcome, glad I could be of help!

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