I’m new to bubble, and I imagine there is a very easy fix for this, but I can’t seem to figure out the solution by myself or in any of the documentation.
Using the example of an airbnb clone, lets say in the create a new listing page i want to have 3 (or more) options via radio buttons. Lets call them 1 bedroom, 2 bedrooms, and 3 bedrooms.
Now, in the header, there should be 3 text links, one for each of those bedroom amounts.
I want to create one listing page, and just pass the information to that listing page that the user is looking at just the 1 bedrooms, or 2 bedrooms, or 3 bedrooms.
So, i can easily create the listings by using a repeating group.
However, my basic question is…
I want to create a dynamic title (h1) at the top of the listing page, that says either 1 bedroom, 2 bedrooms, etc. depending on what the user clicked. I can’t seem to figure out how to do that.
Right now i have a “thing” that has a “Bedroom amount” field that is set to text. (no, i don’t want to switch this to number)
Any ideas would be much appreciated.
ALSO, is there any live chat for bubble users? Slack, IRC, etc?
There are a few ways you can pass data from page to page.
Normally you are passing a thing around, so setting a content type on a page (works well for lists of things)
You can store something on the database (often the User)
Page parameters was added fairly recently, and this is what I have used here.
So I am just passing a text value from one page to another.
If the values are on a thing (so you have a list of things on the page) then doing this in method 1) will be easier.
Have a look, and we can refine until you are happy it works with your application. Often these things are better done in the forum app, rather than having to explain your idea.
So your app works exactly as I would like mine to.
However, 2 things.
I’m not sure how you made it. I set keys in the 3 options as you did, but the dynamic text on the goto page…“Get Type from page URL” is not an option for me. How did you get that as a dynamic option?
and
this is a list of things. The page is a list of 1 bedrooms, 2 bedrooms, etc. So how would I accomplish this using option #1? I’ll fill in the same 2 pages you used on the forum app to show you where i’m at.
EDIT:
Looks like my workflow for something else was bad, but i got this to work.
Okay, got it to work the way Nigel’s example works.
Here is the way things are set up:
**This was the part that i couldn’t figure out. the Header text, which you want to change depending on what they clicked, should be set to “Get ? Parameter from page url”. Select that option, then it will turn blue. Then, you must click the blue “Get ? Parameter from page url” to bring up this little “Get type from page URL” input, and in the parameter name box, type in the key you created at image one (number of bedrooms, color, genre, etc.) I believe it is case sensitive **
hmm, yes it is working, but i believe what i want to do is from the database rather than parameters.
every listing thing has an id of bedrooms, (formatted as text, either as 1 bedroom, 2 bedrooms, or 3 bedrooms.)
But i can’t figure out how to get it from the database. That was what i was initially trying to do.
this solution works, but is a workaround, and is not as scalable i don’t think.
would you mind helping me figure out how to get it from the database?
So, creating a listing is something only sellers do, correct?
So they create a listing and use a radio button to select how many bedrooms their place is, because we only allow 1-3 bedrooms.
Now, if someone comes to the website looking for a place to rent, they can look at the top header links and select how many bedrooms they want, and just see listing with that number of bedrooms.
I guess you can also think of it as a filter in an ecommerce store? If you click on shoes you will only see shoes, pants, only see pants (and it will say shoes or pants etc. at the top)
on the page with the listing form,
I see the heading links that display are created dynamically, “Current cells Bedroom’s Selection”
and
I see that the radio buttons are also created dynamically, “Search for Bedrooms”
but
I can’t seem to find where you defined these dynamic choices.
viewing the live preview shows me both of those areas are filled with one bedroom, two bedrooms, and three bedrooms, but how?