Using Custom States to Create a Quiz with Multiple Responses, Summing Values for Results

Hello, Bubble community!

I’m trying to create a personality test on the platform, but I’m facing some challenges with the implementation and would like to ask for help.

Here’s what I’ve done so far:

Database: I created a database with the questions and their corresponding answers.

User Interface: I set up a Repeating Group to display the questions, where each question is linked to its respective ID in the database. I added the response options, which are: +3, +2, +1, 0, -1, -2, -3.

Custom States: I created custom states to store user responses and the current question, to be saved in the database only after the test is completed.

Challenges I’m Facing:

Linking Responses and Questions: I need to ensure that responses are clearly associated with the corresponding questions. When the user goes back to a previous question, how can I update the response without affecting subsequent responses?

Storing Responses: How can I efficiently store the responses and ensure that at the end of the test, I can calculate the final result based on the given answers?

Changing Responses: When allowing users to change their responses, how can I ensure that the total score is updated correctly?

Summary of What I Need: Tips on how to structure the workflow to store and calculate the responses, which will ultimately lead to a corresponding result.

Would using custom states be the best approach in this case?

Example of how I intend to implement: Teste de personalidade gratuito | 16Personalities

This topic was automatically closed after 70 days. New replies are no longer allowed.