Saving user input to a csv file

Iโ€™ve written the following code which is working fine.
Is there a way of saving the user input to a csv that will update every time a new entry is made every day and can then be downloaded?


import streamlit as st

with st.form('Feedback_Form'):
    st.header('Feedback Form')

    col1, col2 = st.columns(2)
    with col1:
        name = st.text_input('Enter product name')
        How_Many = st.slider('Please Select Quantity',0,10,5)
    with col2:
        Date = st.date_input('Enter Date')
        Time ='Select time to nearest label time', ('7.30', '7.45', '8.00', '8.10', '8.15'))

    submit_button = st.form_submit_button('Submit')

if st.form_submit_button:
    st.write('**Enter product name:**', name, '**Enter Date:**', Date,
             '**How Many:**', How_Man

Hi @liam_healy

It seems that you would like the user collected data to persist across app session. For that youโ€™ll need a database and thereโ€™s several options for you to choose from as explained in the Connect Streamlit to data sources of the Documentations.

For instance, you could use Google Sheets as explained in the link above.

Hope this helps!

Best regards,

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.