One question that comes up often in Bubble forums is “How can I build a form with dependent dropdown elements?” In other words, how can there be multiple dropdowns on a page, where the options of the second or third dropdown depend on the content of the first one (e.g. picking a city once a country has been selected). We’re going to build an app that does this, and then display a picture of the city that has been selected in the second dropdown.
So the idea here is to come up with admin page that allows user of the app to add data, instead of hard coding them? Can the same logic be applied if we dont want it to be user input?
What about having a dynamic element (whatever, dropdown or checkbox) depending on a displayed text ?
I have 2 different tables : one is the question (to be displayed) the other is the answers (good ones and wrong ones). So I first display the question, then I need to display the answers only linked to this question. On my databse, I used a “field type” which is Question’s ID.
Mmmm I see, you used a filter there… But I use myself a text to display the question. When I want to display the options linked to this question, it does not allow me to link to the question…
Here is my database : the options (proposition) are linked to “question”
There is more than one way to work through this particular situation, I will offer one solution (this is the simplest thing that comes to my mind presently).
Since you are creating this logic in the designer and not in the workflow you only have access to the question value. Consequently, you could look up the question by the question text using a filter as I suggested previously, but I don’t personally like this method. So what I would do is this:
Add a hidden text box on the page, search for the random question and add the value of the question’s unique id to that text box.
Then use this unique id value to look up both the question text and the answers.
Alternatively, you could store the random question on a state using a workflow and then you would have access to the question wherever you needed it.