We use subprocess internally for a number of things, including executing Streamlit scripts in our automated end-to-end tests. See the run_e2e_tests.py script for an example in our codebase.
@fedegaucho would you be able to share your implementation? I’m running in the same problem and a work around using just buttons would be very helpful.
Same problem as @coxi and @fedegaucho . We use RStudio Connect to host our streamlit apps, and it seems that forms do not work at all when the app is deployed by RSConnect.
Same error as Lior_D’s original comment. Everything visually renders, but you get a ‘Missing Submit Button’ error and the widgets act like normal widgets, not form widgets.
with st.form("form_name"):
selectbox = st.selectbox("selectbox_text", ["option1", "option2"])
textInput = st.text_input('selectinput_text')
submitted = st.form_submit_button('Submit')
if submitted:
for option in selectbox:
print(option)
I did the following:
selectbox = st.selectbox("selectbox_text", ["option1", "option2"])
textInput = st.text_input("selectinput_text")
if st.button("Button_text"):
for option in selectbox:
print(option)
And it worked for me. The only other issue was the fact that, in the app, once you fill one widget, streamlit runs the whole code. I solved it with if statements.
@tim I’m not sure about it, just saw in some logs that something with boostrap was involved and I inferred it to be related to coxi’s issue. Anyway I just shared my workaround below on Iklein comment, probably not the best but working!
Hi, I ended up here because I too am running into issues with using forms on a Streamlit app that is deployed to RStudio Connect. In both my development environment and the Connect environment, I am using Python-3.8.8 and Streamlit-0.86.0 (have also tried other versions of streamlit >=0.81.0). Running the app locally, the form functionality works perfectly. When running the same app deployed on RStudio Connect, I get the same error message as @Lior_D showed above (“Missing Submit Button”). Wondering if anyone has figured out the issue here? Thanks!
Just to follow-up, in my case it turned out that an API change implemented in Streamlit > 0.78.0 causes issues with certain versions of RStudio Connect. Upgrading RStudio Connect to v1.9.0.1 fixed the issue and enables the full functionality of the latest versions of Streamlit.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.