Hi @hattford,
If you’re wanting to pass data from page to page, you have two options: URL parameters or your database.
URL Parameters
Whenever you use the action Go to Page to navigate to next page, you can add parameters to pass values to the page. A parameter is made up of a key and value pair.
So, if the user typed in their name in an input, then one of your parameter keys could be “name” and the value would be “Input First Name’s value.” This would add the parameter to the URL in the target page. E.g. myapp.com/page2?name=henry
You can send multiple parameters too.
The url of this set up would look something like this:
app.com/bug-report?name=henry&age=20&color=red
Then, on the other page, you’ll be able to extract each parameter value using “Get data from page url” - check out this video to see this in action: https://www.youtube.com/watch?v=vLHiC4Iq8u0
Database
If you have a lot of data to pass between pages, I recommend using your database rather than sending everything via the URL because it’ll be a lot to manage to send and extract. A lot of room for error.
So, in the first step of the form, create a new record of some Thing in your database. For example, if this is an event registration form, then you could have a data type called “Registration” with a bunch of fields that the participant will fill out and save. Step one’s workflow would be Create a New Registration, and you SAVE the values of the inputs to the record, then Go to Page 2 and pass only the record.
Page 2 can now make a change to the record passed to it and save the inputs on its page only. Then it goes to Page 3 and also passes the same record, and so on.
To pass a record to another page, you’ll want to give the target page a Content Type, which will in turn require you to Send Data of that Type in the Go to Page action. I recommend doing Bubble’s lesson on Sending Data to Pages to get up to speed on that concept: Lessons | Bubble.
There is often more than one way to do something in Bubble. Hopefully the above gets you moving forward. If you’re interested in some other methods, you can also:
- Pass a record from one page to another via URL parameter as well (the value would be the record’s unique ID), and when extracting on the target page, you’ll need to define the parameter’s type.
- Use custom states for your form to happen on a single page rather than multiple pages.
- Or for super straight-forward functionality, have one page with multiple groups that you show/hide between steps.
Cheers!
Gaby at Coaching No Code Apps (formerly Coaching Bubble)
Courses & Products, Tutorials, Private Coaching, and High-level Development
Start Learning Today