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