I have a registration form in streamlit. I want to change lists of states that users can choose from based on their choice of country from another dropdown. The problem I'm facing is that unless I actually press Submit button, the st.session_state or dropdown variable doesn't change and I can't see the current user choice.
Can anyone help me with this?
I have tried to use on_change and also save the selection in a variable but they were not helpful.
One constraint with streamlit is when you use st.forms, the selections of any input widget doesn't get registered unless submit button is hit. Only way around I found is you can keep the input widgets which needs dynamic onclick changes outside st.forms blocks
Sample Code
Hope it helps...Cheers!