Streamlit Forms
Learn how to group widgets in forms.
We'll cover the following
The need for forms
When setting up our application, we may need to collect several related bits of information from our users. Forms are a good way to collate these related items and send the results as a single batch to Streamlit.
Each form has its own button—st.form_submit_button()
— that transmits the data once it’s clicked. This button is different from the regular Streamlit button explored in a previous lesson.
For example, we may need a form to collect the details of a purchase order. This is illustrated below:
Get hands-on with 1400+ tech skills courses.