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

survey: Have a way to manage response side effects #776

Open
tahini opened this issue Nov 8, 2024 · 0 comments
Open

survey: Have a way to manage response side effects #776

tahini opened this issue Nov 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@tahini
Copy link
Contributor

tahini commented Nov 8, 2024

Changing the response to some question may impact the choices and previous answers to some other questions (eg. having a driving license will show later the car driving mode choice, or some questions are asked on the first page if hh size > 1, to reduce the number of questions per person in next page)

Currently, the conditional is the place where we would handle the side-effect and potentially change the values of previous answers. Validations and choices function can make a question invalid or change the visible choices. But for those functions to run, the widgets have to be visible on the current page.

But the questions with side effect may not be on the page. For example, changing if a person has a driver license should invalidate previous trips by this person with the carDriver mode, but as long as the person does not go back to the trips section (if the section was previously completed and valid, there's no reason to go back to it), the now invalid questions will not be changed.

The survey framework should plan for a way to detect those side effects and automatically handle them. Also, if side effects are "important" (need to define important), there should be a warning. The case of changing driving license ownership if the person has carDriver segments is one such case.

@tahini tahini added the enhancement New feature or request label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant