test-multipage-app / pages /2_page_2.py
nateraw's picture
Create 2_page_2.py
5767124
raw
history blame contribute delete
457 Bytes
import streamlit as st
form_fields = st.session_state['form_fields']
form_fields['page_2_a'] = st.text_input("Enter something!", form_fields['page_2_a'] or "")
form_fields['page_2_b'] = st.text_input("Enter something else!", form_fields['page_2_b'] or "")
count = 0
if form_fields['page_2_a'].strip():
count += 1
if form_fields['page_2_b'].strip():
count += 1
f"Count for this page is {count}"
st.sidebar.progress(st.session_state['progress']())