# How to stop automatic runing

**URL:** <https://discuss.streamlit.io/t/how-to-stop-automatic-runing/18377>\
**Category:** Using Streamlit\
**Created:** [October 21, 2021, 1:27pm UTC](https://discuss.streamlit.io/t/how-to-stop-automatic-runing/18377 "2021-10-21T13:27:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![karina-castillo](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/karina-castillo/32/11231_2.png) [@karina-castillo](https://discuss.streamlit.io/u/karina-castillo)\
**Post date:** [October 21, 2021, 1:27pm UTC](https://discuss.streamlit.io/t/how-to-stop-automatic-runing/18377/1 "2021-10-21T13:27:40Z")

</div>

Hi everybody,

I want to pass two values, a min and a max, as variables for my code. I have used for this, `st.select_slider` , `st.number_input`, and the problem I have is the same, when I put the minimum value this is automatically launched, and what I want is to put the minimum value, then the maximum and then pass these variables with my “submit” button. How can I stop the automatic launching of these values and only be able to send them with the submit button?

my code:

```auto
      number = st.slider('Insert your min and max value',value=[0.0,1.0])
        
        if(st.button('Submit')): 
            st.write('Your interval is ', number[0],'-',number[1])

```

Thanks!  
Karina

---

<div class="post-metadata">

**Author:** ![randyzwitch](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/randyzwitch/32/58772_2.png) [@randyzwitch](https://discuss.streamlit.io/u/randyzwitch)\
**Post date:** [October 21, 2021, 1:58pm UTC](https://discuss.streamlit.io/t/how-to-stop-automatic-runing/18377/2 "2021-10-21T13:58:02Z")

</div>

Hi @karina-castillo -

If you need to bundle inputs together in such a way that they all need to be finished before submitting, you can use `st.form`

[https://docs.streamlit.io/library/api-reference/control-flow/st.form](https://docs.streamlit.io/library/api-reference/control-flow/st.form)

Best,  
Randy

---

<div class="post-metadata">

**Author:** ![karina-castillo](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/karina-castillo/32/11231_2.png) [@karina-castillo](https://discuss.streamlit.io/u/karina-castillo)\
**Post date:** [October 21, 2021, 8:58pm UTC](https://discuss.streamlit.io/t/how-to-stop-automatic-runing/18377/3 "2021-10-21T20:58:13Z")

</div>

Hi @randyzwitch !

Thank you for your quick response. I will use `st.form` for my problem.

Best,

Karina

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/streamlit/original/3X/c/f/cf4c2ee0d938358f82448c5fe4b9c3c91d7ce19c.svg) [@system](https://discuss.streamlit.io/u/system)\
**Post date:** [October 21, 2022, 8:59pm UTC](https://discuss.streamlit.io/t/how-to-stop-automatic-runing/18377/4 "2022-10-21T20:59:12Z")

</div>

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
