vue-flow-form icon indicating copy to clipboard operation
vue-flow-form copied to clipboard

Feature request: Callback to get another question from the server based on an answer

Open mrivasa opened this issue 2 years ago • 1 comments

Describe the solution you'd like I would like to have an option to send an ajax callback to the server with the answer to a question to get the next question based on the selected answer.

Additional context I cannot use the jump alternative because the options for the next questions depend on what the user selects on the previous question. Ex. Question 1 - What is the car's make? --- go grab all the models for the selected make and display them as options of the next question. 2 - What's the model? .... etc.

mrivasa avatar Sep 28 '21 21:09 mrivasa

@mrivasa,

if only the answers are dynamic, you could do this by defining your questions as components and making your :options parameter point to a data variable which you could populate in your answer event callback. Fully making questions dynamic and fetching all the parameters of the next question from the server could currently be problematic (or even impossible) because of how VFF determines if you've fully completed the survey.

spinn avatar Jun 03 '22 12:06 spinn