Forum Documentation Showcase Pricing Learn more

Progress Bar Calculation For Funding

So I ran into an issue that has been bothering me for months. So I’m trying to do a funding page but the issue is figuring out how to make the progress bar calculate the goal.

Example, I’m trying to rise $1,000. One person gives me $100. How do I show that 10% of our goal is complete while also moving the progress bar towards the $1,000 goal?

I found one helpful topic about it here in the forums but topic was a little different and focused on registered users while mine will focuse on unregistered users.

Would I tell the progress bar the following: payment/funding*100?

I’m on vacation right now so I can’t link the app as I’m on mobile.

Hi there, @kthperkins… it sounds like you are shooting for something like this, right? (Note that in my example, $500 has been raised toward a $1,000 goal.)

If so, I created that using Bubble’s progress bar plugin in conjunction with a Goal table and a Funding table. The Goal table has fields for a goal summary and the amount of the goal. The Funding table has goal field that ties to the Goal table and a field for the amount of each funding.

With that structure in place, the progress bar’s percentage field looks like this…

(I only have one goal in my table, hence the “first item” references.)

Do you think something like this setup could work for you?

Best…
Mike

Thanks Mike. Right now I’m away from a desktop but will try it and come back with results next week.

1 Like

Okay, it took some time but I got it setup but unable to test it. How do I go about connecting my stripe payments to my progress bar?

Sorry, I’ve never set up Stripe, so I wouldn’t know. Do the payments get stored in a table in the db?

No. The payments are stored in my Stripe account which is external. I’m trying to think of a way to track payment. Give me a day. I think I can do something.

Ah, interesting. Sorry I can’t offer any immediate help on that front… but if you are thinking through it and want to bounce anything off of someone else, I’d be more than happy to lend an ear and try to help.

Hey!
You could create a separate table and store the successfull payments details in your Bubble DB.

The table could contain the sum, the fundraiser ID, and stripe payment ID (given back to you by an API once the payment method is executed).

Using the contents of that table - you could summarize the current amount of funds successfully paid vs the target using the fundraiser ID field in that table.

I don’t think there is a way for you to match your data is Bubble with data in Stripe otherwise.

Hope this helps!

Sorry for the late response. Just got off work and while I was there come up with basically what Vlad said but without IDs.

Basically I set the amount like Mike said to the amount I was trying to rise in the database under the Goals table.

Then on the Confirm Pay button workflow which saves the payment information to my Stripe account I added A Create New Thing. In this cause the Data thing would be amount =input value with the amount being from Funds table. So the backer’s input amount will save within that table in the database.

Mike is this what you where trying to get at?

Thank you both for the help. This is one thing that I had trouble with for months. Now on for the most tedious task: Responsive pages! Wish me luck.

1 Like

Yup, that’s what I was trying to get it.

Congrats on getting it working! Oh, and best of luck with the responsive stuff… that’s where the fun really is, eh? :wink:

Seems to be a slight problem. The progression bar is moving up like it is up at 80% when the total amounted to 0.13% The bar seems to be moving at length of the decimals. NM. Solved it.

1 Like

Here is the link to fix the issue if anyone needs it