Skip to content

Commit

Permalink
backend.form: add goto parameter for redirecting
Browse files Browse the repository at this point in the history
  • Loading branch information
div72 committed Sep 26, 2022
1 parent 54e4eb6 commit 388806b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions formie/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ def form(form_id: int):

db.session.add(model(**values))
db.session.commit()

if url := request.args.get("goto", None):
return redirect(url)
return redirect(url_for("forms.view_results", form_id=form_id))

schema = list(enumerate(schema))
Expand Down

0 comments on commit 388806b

Please sign in to comment.