Showing the same button multiple times (e.g Submit button in a form)

Hey all,
I have a form with a lot of widgets in it and I would like to show the “submit” button multiple times (at the top and at the bottom)
other option is to have it floating so the users dont forget to press it at the end of their choices.
First option (of displaying the same button multiple times) would be better for me since it can also be helpful for other uses that I have.
Can I do it somehow?

Hi @alonsh,

Thanks for posting!

You can create a second button that when clicked, results in the submit button for the form being set to True, e.g.:

import streamlit as st

with st.form("form"):
    st.text_input("type here")
    submit_button = st.form_submit_button("submit")

extra_submit_button = st.button("extra submit button")
if extra_submit_button:
    submit_button = True

if submit_button:
    st.write("do something on form submit")

Caroline :balloon: