Help sending data to a page via navigation workflow

Hi,

I have a pricing dropdown on page 1 populated with data from an option set.

Then I want to be able to access the pricing information (option set) attribute of each dropdown selection on the next page, when the “Pay” button (shown below) is clicked.

I intend to use this data here…

When the “Pay” button is clicked, here the data I set the page to send to the next page…

I can’t find this data on the next page however. Please how should I go about this?

Thanks.

What’s your checkout page’s data type? When you do the “Data to send” it is usually retrieved by “Current page’s [thing]” on that page

Hi Tyler,

I don’t have any data type assigned as the options displayed are not relevant.

Just these three…

That dropdown where you pick the monthly plans, is that a data type you’re doing to get different plans? If so set your page to that data type then the Data to send to page is your Dropdown’s value

No, from an option set.

@mikeloc I see you over there :eyes:

Seems odd Bubble doesn’t let you set a page to an option sets value… Maybe it’s to encourage using a data type instead. See what mike says his method is going to be better than mine

2 Likes

Hi there, @Buddha… you could go with a URL parameter on this one. If you want to go this route, change your workflow action to send a parameter like this (note that you can name the parameter anything you want, and I probably wouldn’t call it “pay” so it’s not so obvious that it is the payment amount).

Then, on the checkout page, use the Get data from page URL option in the element that displays the payment amount, and configure it like this.

Just make sure the Parameter name is exactly the same as what you typed for the Key in the workflow action.

Hope this helps.

Best…
Mike

1 Like

My concern with URL parameter is someone tampering with the URL and typing in a custom amount.

Maybe instead the URL parameter type be the actual option set type? And add a new attribute to the option set with the price. Or switch to a datatype at this point.

1 Like

Yeah, good point… even if it’s unlikely, having someone tamper with the amount is still a possibility, so it certainly makes sense to avoid it. The good thing is that the option set already has the attribute on it.

So, @Buddha… you should go this route if you are going to use a URL parameter.

Thanks Tyler for mentioning that. Appreciated.

1 Like

Thanks Mike!

I’ll try this.

Also, out of curiosity, is it possible to set these value in a state, then send the state to the next page…and be able to retrieve the values?

Regards.

1 Like

No… custom states can’t be sent from page to page. If you wanted to send a custom state’s value from one page to another, you would probably be using a URL parameter (or the database) anyway, so there is no need to insert a custom state into the mix on this one.

1 Like

Ok, thanks!

1 Like

Your other option would be keeping your checkout elements on the same as your plan picking page, so you could use show/hide or custom states in that case.

1 Like

Didn’t know I could do that. Thanks.