Getting Missing Submit Button even though I have used st.form_submit_button

I am using streamlit forms. This is my sample code:-

    with st.form(key="income_form"):
        amount = st.number_input("Amount")
        date = st.date_input("Date")
        time = st.time_input("Time")
        note = st.text_input("Note")
        submitted = st.form_submit_button(label="Submit")

When I run it as simple app, it works correctly.
But whenever I try to run this in multi app, I get the following error:-


And also the form is loading every time I change something. This should not happen.

I am not able to debug the issue.

1 Like

streamlit.bootstrap breaks forms. I was using boostrap to debug in PyCharm. When run via terminal this works fine.

1 Like

Do we know if there will be a fix for this reported error with “missing submit button”, it’s a little frustrating?

1 Like

I am also interested in a fix for the form submit button, because I also use streamlit.bootstrap.

1 Like

Hi, thanks for bringing this to light. I suggest creating a feature enhancement in our github issues page (Issues · streamlit/streamlit · GitHub). Based on the likes and community involvement, we highly consider issues with high likes and community involvement!

For those who get the same error but do not have bootstrap components implemented:

I’ve implemented an on_click function in the st.form_submit_button and wasn’t using an if statement for the submit_button that takes action upon clicking the button. Changing my code similar to this removed the error:

submit_button = st.form_submit_button()
if submit_button: do_something

here looking for a solution. When I click form submit button it disappears and I get the same error “missing submit…”

I tried to use the example form submit. It works ok in its own page but as soon as a form is added to the page where I need it there is an error. I do not have an if statement as above.

debugging further it seems there is an error caused by use of
st.session_state.update(st.session_state)

I have been able to remove the behaviour via
st.session_state.update()

It doesnt look like there is any issue with my multipage app with this but now I am wondering why I had the recursive st.session_state.update(st.session_state)

I’m having this problem as well, On submit of the form I set a few session variables, one indicating what step of a process I’m on, and then do both a st.session_state.update and an st.rerun and I still get the form rerendering with the missing buttons error but it only appears briefly.

Same issue with multi-page app and missing submit button. When the app re-runs it throws this error.