Forum Academy Marketplace Showcase Pricing Features

Dynamic questionnaire/survey possible?

Hi there,

I am fiddling around to create a dynamic survey. I would like to know if it is possible in Bubble and what is the best approach to develop the survey front-end and saving the results in the database.

What I want is to render a survey that is configured in the database (creating an interface to create questionnaires like this will come later)

I have a survey that has questions of a specific order and type. Types I want to support are:

  • Open question (text)
  • single select out of a set of answer options (radio)
  • Multi-select out of a set of answer options (checkbox)
  • Yes/no
  • Slider/likert (1-5)

Beside the order of questions I also want to have a define a conditinal order. In other words skip question(s) based on a specific answer.

Having this approach from the database perspective. I want to use a group that has datatype survey. In this group I want to put a repeating group for questions. In each question I want to have a group for each question type, which is shown based on a condition on question type.

If a choice needs te be made from a set of answer options I want to use a repeating group in the question group rendering the answer options which radiobuttons or checkboxes

Then when an answer is given I need to check if conditional question flow applies and if so which questions needs to be shown/hidden.

At the end of the survey the user saves the survey and answers will be stored in the database or I save it after each questions.

Is this kind of set-up possible in Bubble and is it smart to use repeating groups to render the questions and answer options. I’ve read somewhere on this forum that receiving answers from a repeating group is not the best approach. I also have some doubts that loading the survey can feel rather slow.

Further more, is it wise to use custom states for the conditional flow or should I use the database?

I would like the receive some insights just to be sure I can start from a good baseline rather than going down the rabbit hole :slight_smile:

Thanks

2 Likes

Hey, did you get to a good solution to this in the end? I’m doing something similar with a booking system that is dynamic depending on the type of service being booked etc.

HI – Found your question, I am also trying to do this questionnaire/survey with skip logic and branching etc, to get a customized user/ buyer profile which connects to certain service that are appropriate. I didn’t get too much response to my question last week. Curious what direction you went in. QuestioinPro does exactly what I need and there is a zapier integration, but that’s probably not a solution for a marketplace style app I want to build.

Regards,
Damian

Hi All - how did your projects go? Looking at building one myself and curious to hear about yours!

@simon10 @FJP @damiandurrant27

Hi Jared: Went the route of signing up with a Bubble consulting group to help me build this and learn Bubble in early January. But seems to be very possible.

Cheers
Damian.

Okay cool - I am going to try to build it myself throughout January / February so we will see how it goes. Out of curiosity, how much are they charging you for the service?

Hi all,

It was a sort of hobby case, and the past months I didn’t had time to Bubble as much as I wanted. I am planning to try to built this use case in the beginning of next year. So no solution yet. But let’s share our insights and findings and progress here to help each other out!

Hey all,

This is very possible. I believe that @gf_wolfer sells a template that does this: https://bubble.io/template/top-shelf-forms-1534532928718x437064795748827140

I looked into that. Really cool is the way the submissions are designed. Somehow it creates dynamic columns for each question in the form. No clue how to do that in pure Bubble.

Thanks @johnny!

It is definitely possible to make something like this in Bubble. But it can take a fair bit of time and Bubble skill to make depending on the exact functionalities you need.

If you want to make a standard survey that you don’t need to regularly change and you are the only one creating and editing it than it might be easier to ‘hard code’ the questions and logic in the Bubble editor instead of having them be dynamic data types.

If you want a more of a dynamic form builder (as I take it most of you do), then I recommend starting with as few ‘Question types’ (text, number, phone, dropdown, multi select, radio buttons, etc) as possible as each one requires more complex structuring and conditions. In my template there 5 different question types you can use. But it does not have the ability to add ‘logic’ based on previous answers - this could be a rather advanced build depending on how the logic should work and how ‘smart’ it should be.

As with any app build, make sure you fully plan and scope out the product and features before you start building. It may seem simple what you want but there are actually a ton of decisions that go into the design of this type of app and each decision can change the structure and work needed to build it. Here’s a few considerations that could add a lot of complexity:

  • how many ‘paths’ can the survey lead down (total permutations)
  • how many previous answers are needed to determine the next question (always one answer, or multiple)
  • are calculated values need to determine the next question
  • will the next question require dynamic values from previous answers
  • how do you want the Results of the survey to be displayed or used (more complex reporting can lead to more advanced development)

Best of luck with it, it’s a fun type of project to work on in Bubble :metal:

6 Likes

Hi Jared,
I experimented with several approaches and settled on a semi-hard-coded solution. Fully dynamic (i.e. database driven) is actually much more complicated than it first looks, particularly if you want to be able to go forward and back in the form.

Approaches I considered:

  • Hard coding using show/hide and/or custom states: a complex web of workflows or conditionals e.g. “if x selected, show group y when next is pressed”. This will work and is easy to implement, especially for shorter or simpler forms.
  • Question lists: generate a list of questions (a data type in database), which then changes based on responses. e.g. “if x selected, add question A to current user’s question_list”. Each question answer had a ‘next question’ attached to it in the database. I then had a custom state called ‘current question’, which essentially was driven by the current question in the question_list + 1. This works if your question order doesn’t matter, but you can’t slot questions in between others i.e. it is a linear list.
  • Semi-hard-coded: we created question answers as Options, with ‘next question’ as an attribute. So for example, if you selected option B, it would set the ‘next question’ custom state as option B’s next question attribute. The next question would then show based on a conditional parameter (e.g. when next question is Z, show group Z). This works but is quite time consuming to implement. It does have the advantage of being able to change the options and next questions in the Option rather than searching through hundreds of workflows.

Ultimately, we didn’t find an elegant solution to the problem but it does work. The best thing we did was map out the entire form in Excel with each question, answer and the next question for each answer.

If anyone has better options then very keen to hear it :slight_smile:

3 Likes

Hi Jared; sorry for delay its about 3k I believe for an entire 12 week course that gets you to an MVP as a whole, or at least that is the plan. So far so good. Regards,

@damiandurrant27 No worries at all - how is it going for you?

Awesome. Thanks for your input! I think I like option two the best if I’m trying to avoid hard coding. If I pursue this project further, I will let you know how it goes!

I’m trying to build something similar. Were you able to get this done?