title: Pass a variable to a Flask WTForm
body: <p>I want to do a query select field with a default value that is passed in from the route.  I can't figure out how to pass a variable from the View to the Form class</p>
  
  <pre><code>class transactionsForm(Form):
  
  loan_id = QuerySelectField('trans_id', validators=[Required()], get_label='name',
                             query_factory=lambda: trans.query.filter_by(trans_id=[MY VARIABLE]).all())
  </code></pre>