title: How to pass parameters on onChange of html select with flask-wtf
body: <p>The following flask code creates a select .. option dropdown menu:</p>
  
  <p>model:</p>
  
  <pre><code>class SelectForm(Form):
      country = SelectField('Country', choices=[
          ('us','USA'),('gb','Great Britain'),('ru','Russia')])
  </code></pre>
  
  <p>flask app:</p>
  
  <pre><code>@app.route('/new')
  def new():
      form = SelectForm()
      return render_template('new.html', form = form )
  </code></pre>
  
  <p>html file:</p>
  
  <pre><code>&lt;form method=post action="/register"&gt;
      {{ render_field(form.country) }}
    &lt;p&gt;&lt;input type=submit value=Register&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>macro file the defines render_field:</p>
  
  <pre><code>{% macro render_field(field) %}
    &lt;dt&gt;{{ field.label }}
    &lt;dd&gt;{{ field(**kwargs)|safe }}
    {% if field.errors %}
      &lt;ul class=errors&gt;
      {% for error in field.errors %}
        &lt;li&gt;{{ error }}&lt;/li&gt;
      {% endfor %}
      &lt;/ul&gt;
    {% endif %}
    &lt;/dd&gt;
  {% endmacro %}
  </code></pre>
  
  <p>What is the best way to have onchange submit the results automatically without the user having to press the submit button? Is there a way to change the macro or what's the most elegant way?</p>
  
  <p>thanks</p>