Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mrivasa opened this issue Sep 28, 2021 · 1 comment
Assignees

Comments

@mrivasa
Copy link

mrivasa commented Sep 28, 2021

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.

@spinn
Copy link
Contributor

spinn commented Jun 3, 2022

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants