add question with dependency

Picture of reza budi ryanzah
add question with dependency

hi i'm still new in moodle. Now i'm making a feedback in my moodle. But my boss really need to make it dependent each other, for example:

Q1. Do you smoke ? Yes -> go to Q2

                                 No -> go to Q3

i've tried to make it but it's not work. Is there anybody could show me how to do that. Thank you very much....

Average of ratings: -
Picture of Andreas Grabs
Re: add question with dependency
Core developersParticularly helpful MoodlersPlugin developersTranslators


here the text from the help button:

It is possible to show an item depending on the value of another item.
Here is an example.

  • First, create an item on which another item will depend on.
  • Next, add a pagebreak.
  • Then add the items dependant on the value of the item created before. Choose the item from the list labelled "Dependence item" and write the required value in the textbox labelled "Dependence value".

The item structure should look like this.

  1. Item Q: Do you have a car? A: yes/no
  2. Pagebreak
  3. Item Q: What colour is your car?
    (this item depends on item 1 with value = yes)
  4. Item Q: Why don't you have a car?
    (this item depends on item 1 with value = no)
  5. ... other items

I hope it helps.

Best regards

Average of ratings: Useful (1)
Picture of reza budi ryanzah
Re: add question with dependency

Thank you Andreas, it's really help..

Best Regards,


Average of ratings: -
Chat Noir
Re: add question with dependency

I know this is old, but I have encountered this problem - despite very careful attention to the instructions, and to spelling, I cannot get the 'No' choice to jump to a different question. The client must click through all the intermediate questions.

If they select the 'Yes' choice, they are presented with the proper question. It would really be useful to have the user able to skip ahead about 30 questions, when the answer is 'No' - but really it is no different than just selecting N/A to the dependant question, and ignoring the dependance feature altogether....

FWIW, none of the intermediate questions are marked "required"



Average of ratings: -
Picture of Emma Richardson
Re: add question with dependency
Documentation writersParticularly helpful MoodlersPlugin developers

Do you have a page break before the question that you want No to jump to?  Can you post screenshots of that question?

Average of ratings: -
Mary Cooch
Re: add question with dependency
Documentation writersMoodle Course Creator Certificate holdersMoodle HQParticularly helpful MoodlersTestersTranslators

Yes; what Emma says and also take a look at the section Dependence item and dependence value in Building Feedback

Average of ratings: -
Picture of Sebastian Wz
Re: add question with dependency
(old thread, but still relevant)

The problem for me is that you're forced to have an equivalent question (or label etc.) on every level, which is not very user friendly. The way it is now, I can't just skip ahead to the next main question or the end-of-survey-message.

Returning to the car example:
What if I'm just not interested in people who don't have cars and want to send them directly to the end,  BUT still ask car owners several other questions? In the example below, when I say NO, I'm forced to click through an empty page before I reach the end because one branch goes deeper than the other.

Maybe a solution would be to make page breaks potentially conditional as well ("only display this page break if Q1 = yes", followed by a question that also only shows up if Q1=yes) or attach them to survey elements.

Jumping ahead to different elements works fine in lesson (probably because there you set up pages or choices to actively lead somewhere instead of being passively activated/triggered by something as in feedback. But then there's probably a good reason for that, whatever it may be ;)

Or am I missing something here?

By the way, here's a recent tracker issue about empty feedback pages.


Average of ratings: -