I am a newbie to flask and trying to make form submission with two webpages.
Basically, there are two webpages, in the app.py they are routed as
@app.route('/')
def index():
...
@app.route('/results', methods=['POST'])
def results():
...
There are one form submission on '/' and one on '/results'. Right now, clicking the button on '/' redirects the user to '/results', with the input text sent to '/results' as well
<form method=post action='/results'>
<dl>
{{ render_field(form.channel_title ) }}
</dl>
<input type=submit value='analyze' name='sumbit_btn'>
</form>
This part works. What I want to do now is to click the button on '/results' such that the text in its input form is used to update some text on itself. The problem is that in order to render '/results', input from '/' is needed.
def results():
....
return render_template('results.html', channel=channel)
How can I implement this form submission on '/results' then, which send both its own form input and also the old input from '/' such that '/results' can be updated? Any suggestion is appreciated. Thanks.
<input type="hidden" value="your stuff"/>.