I'd like to pass additional argument next
(it should be endpoint) to the request when submitting the form. I've tried:
<form method="post" action="" next="/apply">
but it doesn't work.
Later when receiving the form I just need to read it from request.args
. How to do it correctly?
You can use a hidden form field.
<form method="post" action="">
<input type="hidden" name="next" value="/apply">
<!-- the rest of your form code -->
In your Flask function:
next = request.form.get('next')