Forum Academy Marketplace Showcase Pricing Features

How to restart current page parameters? (Keys)


If we used parameters on a page to trigger certain elements’ visibility, and then with the same button we set a (key) parameter to be empty -

How to restart, or delete respective parameters (keys) from the page url?

If you can run javascript on the workflow then you can use:
window.history.pushState(null, 'Sign Up', '/signup')

This is an example I use for my signup page because there are parameters in the url that I want to be erased from the address bar after saving them to custom states on page load. The first argument (null) is a state object, the second (‘Sign Up’) is the title on the tab of your website, and the third (’/signup’) is what will be seen by the user as in If you were only trying to remove one parameter and leave others then simply add them to the end of the third argument.


Use the action “go to page” (the same page) and send all parameters needed in the updated url including empty ones for those that you want to be empty. The page will not refresh … it will just reflect the new url and your Bubble logic and UI will react as conditioned.

Thanks William!

That is really specific and it seems - working solution, although will give some time to explore other options, mainly as I am not that experienced with the “code”, that raises following question, could you share one or more screenshots to see exactly how is done with the javascript? Thanks!

Also thanks to @cmarchan with proposed potential solution - upon which I am currently based, i.e. having such workflow to erase the parameter, but the parameter Key stays in the url, which I am trying to “erase” as well.

Thanks both of you once again!

1 Like

You can use the free Toolbox plugin to use the action ‘Run javascript’:

I have mine on a workflow that runs as soon as the page is loaded.

We have a referral based system for signing people into our app. So on another page, an already logged in User will enter an email amongst other relevant information and that information is appended into a url link that we email to the new user. When the new user clicks on the invitation link from their email, which is converted to a hyperlink so they never see the information, it opens a browser window and directs them to our signup page with the url parameters. We then grab those parameters on page load and save them as custom states so they can be referenced throughout the signup process. The very next step in the workflow after saving the information is to erase the parameters from the url so we run the javascript as seen in the picture.

So it changes the url in the address bar from this:
To this:


Thanks William!

I feel you have done your part here! :slight_smile:

Hope this will help to developers here!

I am continuing with the search toward yet another approach :smiley:

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