I'm working on a web app in Streamlit and I am looking for a way to have multiple questions per page (see below). At the moment if a user replies to the first question or to the second one, the app automatically loads the next set of questions. How can I change things so that the next set of questions is loaded only if the user replies to both the first question and to the second one?
The logic I am using at the moment is the following:
st.table(Text_lines)
col1, col2 = st.columns([1,1])
with col3:
if st.button('Option 1'):
st.session_state.option1 = 1
with col4:
if st.button('Option 2'):
pass
st.table(Other_text_lines)
col3, col4 = st.columns([1,1])
with col3:
if st.button('Sensible (Q)'):
st.session_state.sensibility = 1
with col4:
if st.button('Not sensible (W)'):
pass