File size: 895 Bytes
bfd7afb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Import the Streamlit library
import streamlit as st

# Function to define the app logic
def app():
    # Add a title to the page
    st.title('Basic Information Form')

    # Use a form for input collection
    with st.form("basic_info_form", clear_on_submit=False):
        # Input field for name
        name = st.text_input("Name")

        # Input field for mobile number
        mobile_no = st.text_input("Mobile No")

        # Input field for email ID
        email_id = st.text_input("Email ID")

        # Submit button for the form
        submit_button = st.form_submit_button(label='Submit')

        # Logic to display a message once the form is submitted
        if submit_button:
            st.success("Thank you for submitting your information.")
            

# Ensure that the app function is called when the script is executed directly
if __name__ == "__main__":
    app()