streamlit-survey icon indicating copy to clipboard operation
streamlit-survey copied to clipboard

[FEAT] Hierarchical question identifiers

Open OlivierBinette opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

I'd like to more easily extract the answers to questions, especially when a single users answers the same question multiple times in relation to different test cases or situations.

Describe the solution you'd like

Question IDs should be indexed hierarchically. For instance, if I want to ask a user if there is an error in a test case corresponding to the current page index, I can use something like:

error = survey.radio(
    "Is there an error?", options=["No", "Yes", "Unsure"], horizontal=True, id=("error", page.current)
)

rather than setting id=f"error_{page.current}".

This should make it easier to automatically analyze answers, especially when a single user is asked the same question in regard to many different things/test cases.

OlivierBinette avatar Mar 29 '23 13:03 OlivierBinette