ditdot-dev / vue-flow-form

Create conversational conditional-logic forms with Vue.js.

Home Page:https://www.ditdot.hr/en/vue-flow-form

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

In the multipleChoice question, if multiple=True and the jump statement is included, the previously selected value does not disappear and the value is added.

6540140 opened this issue · comments

Describe the bug
The questionnaire consisted of three questions with IDs a001, a002, and a003.
And..Specify the question properties as below.
a001 : multipleChoice, multiple: false, option = A, B, C, D, JUMP={A:a002, B:a003, _other: _submit}
a002 : multipleChoice, multiple: true, option = A, B, C, D, JUMP={ A:a003, B:a003, _other: _submit}
a003 : multipleChoice, multiple: true, option = A, B, C, D, { _other: _submit}

And the survey is conducted as follows.

  1. a001: question: Choose A
  2. a002: After selecting B and C
  3. Go back to the previous question (without pressing [next])
  4. in a001 question, Choose B
  5. Skip the a002 question as it is..with jump
  6. a003: Choose D
  7. survey is ended..

When receiving data
I think {"B", "B,C", "D"} should come in, but
Actually
{"B, "B,C,D","B,C,D"} comes in.

because..

  1. Without deleting the saved selection value for the question branched by the first option
  2. After adding the value selected in the question branched by the second option to the value of the first option
  3. Distributed to items.

To Reproduce
For multiple selection with jump statements
If you go to the previous question and the choice changes, I think you need to reset the value and get it again.

Screenshots
i made a demo..(sorry. it's korean..)
To see the response value, just look at F12 - console

http://research.run.goorm.io/survey/error/
Desktop (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
I'm just a teacher working at the education office... and I don't have enough skills anymore...Sorry

This is something that is not handled by Vue Flow Form but is left to the users to handle however suits them best, we just pass on the complete questions array and their associated answers. To accomplish what you want you could iterate through the question array and depending on the answer skip questions that you don't need.