Forum Academy Marketplace Showcase Pricing Features

Trying to replicate OkCupid style question answering

I’m trying to create a form similar to OkCupid’s question answering.

I currently have a data type called “Question/Answer” to create the first item and radio buttons for answering these
I have a second data type for the two fields below that called Question Response.

I’m trying to connect these fields to each other through the Question/Answer Unique ID to ensure that the user has only answered each question once and their answers are saved in the Question Response database.

In my design I have two repeating groups with 1 cell each that I want to use for loading dynamic data and saving the data if modified or created. Am I going about this the right way or is there a better way?

Devs, is what I’m trying to do even possible with bubble?

Just bumping this to get some attention. Would love to build on this platform but having difficulty determining if it will work for my needs.

The best way to get help is to put an example in the forum app.

It is a lot quicker to “see” what is going on rather than trying to work it out from the text. I have read this a few times and not really understood what it is you want.

Don’t see any reason why you can’t do this, but linking things via their unique id is seldom the right thing to do.

Sorry for the delayed response on this. Here’s a link to the page I’m having difficulty with: https://bubble.io/page?type=page&name=answer_questions&id=roommate-finder&tab=tabs-1

@NigelG just curious about the best way to link things.

I mostly just reference the data I need directly. So if I need info from a specific client, I attatch the client so I can gather what info I need without searching.

Could this be a security issue?

Thanks will have a look.

Ok, so everything should link nicely without needing unique ids.

Question’s have many possible Answers. A Response is a particular user’s selection of an Answer to a Question.

Question has a field, of type Answer that is a list.

Answer has a field that is type Question (to link back the that parent question).

Response has a field of Type Question, and Type Answer (so the response given). It also has a list of acceptable answers that is not currently used, but hopefully you can see how that would also be simpler).

You should also think about having a list of Answers on the Question, rather than the 4 Response fields. As soon as you start to have to do things like your way of creating the dynamic list for the drop down (field1:plusitem field2:plusitem etc) it should start you thinking if this was the best way to set up the data. But it was very clever to do it that way :slight_smile: :slight_smile:

I have created a coulple of new pages (createquestion2 and answerquestion2) that show how much simpler the searches and page will be with this data structure.

Hope that helps a little.

Wow, this is very helpful! Thanks. I’m finding that with bubble I have to work and think in a different way and I’m not sure of the more correct way to handle complex situations that come up when building something.

There isn’t really a “correct” way as such, but you can make like easier for yourself by structuring the data for ease of access.

I’m having difficulty now trying to get the checkboxes to work. Either when the checkbox is changed or when the next button is pressed I want them to store into the list of acceptable answers in the Response table. For some reason though that field isn’t visible in the workflow. I currently have the checkbox values pulling from the list of acceptable answers so when they are answered hopefully the checkboxes will be checked in case the user has answered the question already and is wanting to modify their previous answers.

I’m finding that I’d have an easier time programming the logic in an actual programming language but the frontend stuff would suck up tons of time for me.

Yes, the current selected options are not available to the button because they are inside the repeating group and the button is outside.

Move the button inside and it works better.

The checkboxes need a custom state to get the list of acceptable answers, as you can’t say “all the boxes that are checked” so you create a custom state that holds all the selected answers, and add/remove as they check them. You can then save that state as the list.

It seems not to be storing the response values? Or if it is, the checkboxes aren’t updating properly when the page is reloaded. I tried setting the state of the importance radio buttons when the page loads but it doesn’t appear to do anything. The answer radio buttons don’t update when the page is reloaded either. The hope is that all the checkboxes and radio buttons would show the current value in the database in the event that the user has already answered the given question.