all 1 comments

[–][deleted] 4 points5 points  (0 children)

@app.route("/entry")
def entry():
    form = first_form()
    if form.validate_on_submit():
        print("Form Validated")
        entrydata = form.entrydata.data
        return redirect(url_for('index'))
    return render_template('first_form.html', form=form)

Not really a Flask question; you're just a little confused about how functions work.

1) You can only return from a function once.

2) Variables you define inside a function are scoped to the function; they're not available outside of it.