Getting Tired using streamlit

It’s really getting hard for us to use streamlit, Whenever I do select other option, it’s getting refresh the page and it’s not showing any error but I dont know why its doing like this

1 Like

Hey @Daniyal56 :wave:,
Sorry you’re running into some issues and we definitely want to help solve them.

To be able to help troubleshoot, mind posting a minimum working example of the code (or a github link) that recreates the problem? Any error logs that are generated or a picture/gif of the functionality you’re trying to achieve would be helpful too (if applicable). This helps us understand the problem better to start helping faster! :nerd_face:

Looking forward to troubleshooting together and getting your app running! :balloon:

Cheers,
Marisa

Hey @Daniyal56,

With this small snippet I can’t see the whole flow of your app, so this next suggestion might not be correct, but:

It seems that your st.button('Submit') is inside the elif of another button click from butn_frgt.

So buttons are designed to remember if the user has clicked them only one time, and then they reset. So when you nest a button in a button when you click on the second button the first button is reset on the next rerun of the script.

However, it is exactly this reason that we designed other widgets that will remember the user’s choice (also known as the widget state). These include the st.checkbox(), the st.radio() and also the st.beta_expander().

If you switch your butn_frgt for one of these other options then when your page refreshed when the user clicks the "Submit" button it will work!

Hope this helps!
Marisa

Look at this where the submit button is and then let me know

Further please let me know how can i use card of bootstrap in streamlit properly

Hi,

Actually I don’t know how these buttons are linked on the back end (in your script). I would need to see your code to be able to help fully!

Sorry, I don’t know what you mean by this!

Marisa

ok, I’ll clear this but please clear the issue of the last topic of submit button

I can not use radio beta_expander widgets becoz of odd UI.