Version 0.81.0

@Jacob_Lukose - Python’s subprocess module is a good way to procedurally invoke other processes, including Streamlit.

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.

Hey @lklein, Instead of this:

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.

Hope it can help

@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.

Great to hear, thanks for posting @timL!