Spaces:
Running
Running
import streamlit as st | |
def exit_screen(): | |
"""Display exit screen""" | |
st.markdown(""" | |
<div class='exit-container'> | |
<h1>Thank you for participating!</h1> | |
<p>Your responses have been saved successfully.</p> | |
<p>You can safely close this window or start a new survey.</p> | |
</div> | |
""", unsafe_allow_html=True) | |
if st.button("Resume Survey"): | |
reset_survey() | |
st.rerun() | |
def reset_survey(): | |
"""Reset the survey state to start over.""" | |
st.session_state.responses = [] | |
st.session_state.completed = True | |
st.session_state.start_new_survey = True | |
def display_completion_message(): | |
"""Display a standardized survey completion message.""" | |
st.markdown( | |
""" | |
<div class='exit-container'> | |
<h1>You have already completed the survey! Thank you for participating!</h1> | |
<p>Your responses have been saved successfully.</p> | |
<p>You can safely close this window or start a new survey.</p> | |
</div> | |
""", | |
unsafe_allow_html=True, | |
) | |
st.session_state.show_questions = False | |
st.session_state.completed = True | |
st.session_state.start_new_survey = True | |