Hi community!
While looking for the solution to the above question, I have found this solution from the streamlit community forum. Wonderfully, It works! But it changes all forms background with one common color that I define. How do I control this behaviour for each form??
I want to color these form by individually selecting them.
import streamlit as st
with st.form("My form"):
first = st.text_input("First name")
last = st.text_input("Last name")
if st.form_submit_button("Submit"):
st.write(first+" "+last)
css="""
<style>
[data-testid="stForm"] {
background: LightBlue;
}
</style>
"""
st.write(css, unsafe_allow_html=True)
#form #streamlit #streamlitform