title: How to get the name of a submitted form in Flask?
body: <p>I'm building a website using Flask, and on one page I've got two forms. If there's a POST, I need to decide which form is being posted. I can of course deduct it from the fields that are present in <code>request.form</code>, but I would rather make it explicit by getting the name (defined by <code>&lt;form name="my_form"&gt;</code>) of the form that is submitted. I tried several things, such as:</p>
  
  <pre><code>@app.route('/myforms', methods=['GET', 'POST'])
  def myForms():
      if request.method == 'POST':
          print request.form.name
          print request.form.['name']
  </code></pre>
  
  <p>but unfortunately, nothing works. Does anybody know where I can get the name of the form submitted? All tips are welcome!</p>