Replies: 1 comment 1 reply
|
This isn't possible at the moment. If it was, what would happen if a user selected Ideally Meanwhile, this might be an admittedly hacky and suboptimal solution: extra_tools:
type: str
multiselect: true
default: []
choices:
uv: uv
mytool: mytool
othertool: othertool
validator: >-
{%- set errors = [] -%}
{%- for tool, requires in {
'uv': [],
'mytool': ['uv'],
'othertool': ['uv']
} | items -%}
{%- if tool in extra_tools -%}
{%- for required in requires -%}
{%- if required not in extra_tools -%}
{%- set _ = errors.append(tool ~ ' requires ' ~ required) -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endfor -%}
{{- errors | join(' & ') -}} |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Is it possible to have a multiple choice question where selecting a particular answer would "auto-select" other options?
So e.g.:
This is a very small example, but the idea is that you could stop the user having to individually select options which are required for other options to also work in your final template.
I suspect this is probably only possible if such a thing is supported by
questionary.All reactions