I’'ve created a checklist where each question has 3 options. When the button is pressed it sets the state of the group (each question) and uses conditions to set the buttons colour change.
I need to add the list of checked answers to a database, so that I can use dynamic data on a page that is a duplicate in order to create a PDF of the whole thing.
I just can’t get my head around how to set the list, save it to data base..
That is a very common issue for people that are learning Bubble. Hope we can help.
How do you have the page set up? Are you using a repeating group to display the list there?
Got it. So I would recommend creating a template of these values in the database. Then when they choose an option, you can just save it into the database as they choose. That seems like the easiest way to go.
Either, create a copy of those questions for each user or create them as you press the button.
Does that make sense? Need me to set up an example? There are probably a few ways to do this, this just seems like the easiest.
You can follow the backend structure suggested by @J805, and to handle the user responses, you can set a workflow for each of the three answer buttons.
Each workflow should create a new entry in a data type called Answers, with fields like:
Data Type: Answers
User (type: User) – the person who answered the question
Question_relation (type: Question) – the related question
Choice (type: Option Set) – the selected answer
This way, each time a user selects an option, the workflow stores their response in the database, keeping everything organized and linked.