Hi @azzi welcome to the community!
Have you tried to use st.form? It seems that you are looking for something like in this example?