Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Flask select which form to POST by button click

from flask import (
    Flask,
    render_template,
    request
)

app = Flask(__name__)

@app.route('/', methods=['GET', 'POST'])
def index():
    if request.method == 'POST':
        print(request.form.get('value', type=float))
    return render_template('index.html')
 
PREVIOUS NEXT
Tagged: #Flask #select #form #POST #button #click
ADD COMMENT
Topic
Name
6+3 =