Only one user option from multiple checkboxes

Following scenario:

I wanted to create a simple programming quiz app. Now I have four options on each question represented as st.checkboxes.

Problem:

How can I tell streamlit to only mark one question, so if the user marks one question the other answers are disabled.

Hi @MaxMnemo,

The behavior you’re looking for is available using st.radio :slightly_smiling_face: With st.radio, users can select at most 1 out of n provided options.

Best, :balloon:
Snehan

1 Like

Thanks. I’ll switch to radio buttons then.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.