title: How to Reload Flask-based Webpage after form submission
body: <p>Here is my code currently (omitting libraries and other unnecessary parts):</p>
  
  <pre><code>    app = Flask(__name__)
  
      class SearchForm(Form):
          inputString = TextAreaField('', [validators.DataRequired()])
  
      @app.route('/')
      def index():
          return render_template('Website.html')
  
      @app.route('/results', methods=['POST'])
      def results():
          ...
          form = SearchForm(request.form)
          if request.method == 'POST' and form.validate():
              inputString = request.form['inputString']
          ...
          return render_template('Website.html', cLinkName=cLinkName, \
                                                 lLinkName=lLinkName)
  
      if __name__ == '__main__':
          app.run(debug=True, use_reloader=True)
  </code></pre>
  
  <p>And here is the webpage (showing only the form and the variables that are changed when the <code>SearchForm</code> is submitted):</p>
  
  <pre><code>    &lt;form method=post action="{{url_for('results')}}" style="text-align: center;"&gt;
          &lt;input type="text" id="inputString" name="inputString"/&gt;
          &lt;input type=submit value='Search' name='search_btn'&gt;
      &lt;/form&gt;
      &lt;table align="center" border="1"&gt;
          &lt;tr&gt;
              &lt;td style='text-align: center;'&gt;{{ cLinkName }}&lt;/td&gt;
              &lt;td style='text-align: center;'&gt;{{ lLinkName }}&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  </code></pre>
  
  <p>Firstly, I have looked at <a href="https://stackoverflow.com/questions/41270855/flask-redirect-to-same-page-after-form-submission">Flask: redirect to same page after form submission</a> and I believe I tried to implement what was accepted as the correct answer, but it did not work for me since I am also trying to submit variables to the updated webpage rather than just refresh the webpage.</p>
  
  <p>I want to be able to submit the webpage's <code>SearchForm</code> and then update my webpage with the <code>cLinkName</code> and <code>lLinkName</code> produced from submitting my <code>SearchForm</code> more than once. Unfortunately my code is only allowing me to submit the <code>SearchForm</code> and then update my webpage with the <code>cLinkName</code> and <code>lLinkName</code> produced from submitting my <code>SearchForm</code> exactly once. And, when I try to reload the webpage I receive a "Continue Form Resubmission" pop-up. So my question is how can I get my webpage to allow me to submit the <code>SearchForm</code> and update itself more than once?</p>
  
  <p>After further research, 
  <a href="https://stackoverflow.com/questions/31945329/clear-valid-form-after-it-is-submitted">Clear valid form after it is submitted</a>, I can now ask for GET requests and ensure that I can reload the <code>localhost/results</code> page and submit another form, but it does not run the form through the algorithm again.</p>