I am trying to create an app which will allow me to create surveys, and store the data in a specific way. Right now I am working on the interface first, and I want to be able to navigate to a specific section and question number using URLs, and for the URLs to use the slugs of each section/question.
I have this page set up, and I have the basic navigation set up the way that I would like it to work, and now I would like to have the URL update when the user navigates between sections and questions.
Just to be clear… are you saying you want your URLs to be : mastery-io.bubbleapps.io/version-test/form/win-loss/1 mastery-io.bubbleapps.io/version-test/form/win-loss/2 etc…?
Firstly, you’ve missed out the most important part of the code I used (the bit that actually does anything) window.history.pushState(null, null, nextURL);
Secondly (assuming the screenshot you’ve provided is from your own app), you’re setting the URL to the page called “url-update-path”… which was the name of the page in my demo app (and I’m guessing not the name of a page in your own app)…
Obviously, you’ll need to use your own page name (not mine) after the home URL…
(“Form’s Section Index” is a custom state I’ve put on the page to remember which section the user is on)
As long as that relates to something in the database, that’s fine…