Stumped On Start over/Go Back Button

Good morning everyone!

I have tried to fix my problem and I am stumped on creating a Start Over and Go Back button on my site, so any help would be greatly appreciated.

Here is a link to my sample page (forgive the colours in the background, I put those in there to show myself whether or not the changes in state I was intending to make actually worked, the colours will be removed in the live version):

https://qwybble.com/version-test/index_practice_2

Here is the situation:

User logs in, selects a category, no problem, here is the flow for that, when the user chooses a category, “Electronics”, for example, a new state of the destination page is set:

image

On the destination page, a repeating group of dollar values is presented.

Great.

However, when the user clicks on the “Start Over” button and goes back to the original categories page, and then clicks on “gasoline”, or “appliances” for example, then dollar values that are now presented remain the dollar values that were presented for “Electronics”, then if they start over again, and click on another category, the dollar values are screwy even more.

I suspect the issue is that while a State is set when the user originally clicks on Electronics, when the user clicks start over, the State is somehow not being re-set to start from scratch, so its pretty funky and I really have no idea how to fix it, I’ve tried a hundred times to change the states and those types of things, so I’m pretty much out of ideas.

Here are some directions on what I am doing:

  • user selects category from a repeating group
    step2
    step3

  • user is moved to a second repeating group of dollar values, a new state is set

  • start over button is clicked, user goes back to originating page, a stage is set which is intended to start from scratch but clearly isnt


    step5

  • user clicks on another category, a new state specific to that category is set, and the states control what set of dollar values are presented, these dollar values and the states are getting mixed up

  • I should also note that the repeating groups should be displaying different sets of categories and different sets of dollar values based on the stages that have been set
    step5

And that process you can if/when you visit the page above.

Thank you for any assistance or ideas you might have, I hope that all made sense and happy to answer any clarifying questions.

L

Have you already tried using URL parameters to show data and set states?

Example: user clicks on button which triggers a “go to curren page” workflow.

Send additional parameters: category = electronics

Add a “when page is loaded” workflow. Set state of RepeatingGroup: get data from url

(Get category from url)

This way every time you go forward or go backwards, the url parameters refresh the relevant content.

Your start over workflow will simply be a “go to current page” workflow, where additional parameters category = and money =

That way, the page is loaded workflow will result in empty states.

Great idea, thank you very much, might I ask, would you suspect that that process would be slower than remaining on the same page?

In the back of my mind, speed/ease of use for the user is key so I dont want user experience to be frustrating.

I will 100% look into your suggestion and compare though.

Thanks again.

L

There’s no loading screen or additional loading time.

URL parameters are instantaneous as long as you’re directing the user to your current page.

I
I’ll attach 2 screenshots of my single page app. Switching tabs is instant. The groups only show themselves when index’s nav = home or index’s nav = hives-home

On page load, I “set state of index” and get X from page URL. Bonus points if you use an option set, but you can just use numers if you want to.

When get X from url = 1 then show Step 1

When get X from url - 2 then show Step 2

Everytime you click on your back button, the “page is loaded” workflow triggers itself and shows // hides the relevant group.

It sounds like you’re suffering from lingering page states. When the user clicks the restart button, you’d want to clear the state that was set (set state: blank), then perhaps reset any other groups/inputs for good measure.

You may benefit from creating your list of page states as an option group. Then you’d be able to set (and clear) a single, page level state at the start/end of each run. This would keep your workflows tidy, and remove the need to have multiple boolean states on your rg.

Hope that makes sense!

Thank you so much for the help and suggestion Ed19, I sincerely appreciate it and you taking the time to send it to me. A huge help!

Thank you so much for the help and taking the time to send me the suggestion, Perfect.

Since I read your suggestion, I’ve been digging in to it and its been extremely helpful, it is exactly what I was looking to accomplish and, even though I nearly need to re-do my entire site, its a small price to pay because its going to give me exactly the site navigation that I have wanted for years but not known how to accomplish!

At your challenge, I’ve also worked in option sets, which are now like the backbone of the site, eliminating the need for almost all the data I had loaded up previously.

I can’t overstate the impact your suggestion has had so thank you!

L

1 Like

It warms my heart that you were able to find some success. You can always ping me with any questions regarding the Single Page Framework.

I’d also recommend checking out this goldmine of a thread by @rico.trevisan

Single-page application framework: App Shell [free tutorial] - Tips - Bubble Forum

1 Like

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