Add conditional input in st.form

Is there a way to have this behavior also in st.form?

such a feature could be especially useful for optional inputs

Short answer is no, because all components within the st.form wait for the st.form_submit_button to pass their values. But a workaround using st.empty containers was posted in the original thread.

1 Like