Display Value of a chosen field from my database


I’m new to Bubble so forgive me if this is obvious to more experienced users…

I’ve added some fields to the database, in this case for three different types of roof. Each has a different cost. So in my database I have the type of roof and a separate field for the cost e.g.

Flat roof £50
Gable roof £70

I’m asking users to select their preferred roof option from a drop down list using dynamically inserted fields from the three roof choice options in the database.

I then want to be able to display the cost once they select, so for example if a flat roof is £50 per square metre I want that to display immediately once they select the drop down option.

How do I do this please?


Hi there, @david68… one way to do what you have described is to use an option set to define the roof types and their associated costs (if you aren’t familiar with option sets, you should read up on them because they are super useful). To go this route, you would create an option set where the options are the roof types, and you would add an attribute (number) to the set where you will define the cost associated with each roof.

Next, you would add a dropdown to the page and configure it as follows.

Finally, you could add a text element under the dropdown to display the selected roof’s cost, and that element could be configured like this.

Hope this helps.


Thanks Mike, That’s really helpful.

1 Like