title: I am using Streamlit to build a form that based on answers builds another form, how do I hide the form so they don't stack?
body: <p>I am building form using streamlit.  I use the session_state to control what section of the questions to appear.  This is section 1 but there are over 10 sections, not all sections get asked, it's based on you how you fill out the last section.</p>
  <pre><code>    if 'section' not in st.session_state:
        st.session_state['section'] = 'section 1'
  
      if st.session_state['section'] == 'section 1':
        with st.form(key='Scoresheet', clear_on_submit=False):
          st.markdown(&quot;&quot;&quot;
            ### ScoreSheet
            Repeatable sheet for Grading tech tickets
            &quot;&quot;&quot;)
          tech_name = st.text_input(&quot;Tech Name&quot;)
          date = st.date_input(&quot;Date&quot;)
          ticket_number = st.text_input(&quot;Ticket Number&quot;)
          phone_availability = st.radio(&quot;Phone Availability (Weekly)&quot;,['&lt;10','20','30','40','50','60','70','80','90','100','N/A Leads // Special Project'])
          outage = st.radio(&quot;Large Outage&quot;,['TSP','Large Outage','Protedcted Sonet','Protected Wave','Point to Point SONET','Point to Point Wave'])
          next1 = st.form_submit_button(label='Next')
  
        if next1:
          st.session_state['Data1'] = {'tech_name': tech_name, 'date': date, 'ticket_number': ticket_number, 'phone_availability': phone_availability, 'outage': outage}
          if outage in ['TSP']:
            st.session_state['section'] = 'section 2'
          elif outage in ['Large Outage']:
            st.session_state['section'] = 'section 3'
          elif outage in ['Protedcted Sonet','Protected Wave']:
            st.session_state['section'] = 'section 4'
          elif outage in ['Point to Point SONET','Point to Point Wave']:
            st.session_state['section'] = 'section 5'
  
  </code></pre>
  <p>When you click submit it renders the next section's form underneath the existing form.  This happens for each section, unless you click the menu item for the questionnaire, in which rebuilds the page with just the current section.</p>
  <p>I would like it to clear out the previous section and just show the current section.</p>