title: Automatically setting the id HTML attribute of a form element in flask-wtforms
body: <p>Is there a way to automatically have the <code>id</code> of a form input element itself to the name of the form <em>and</em> the name of the field variable? i.e. for a <code>bar</code> field in a <code>FooForm</code> instance, the <code>id</code> would be <code>foo-form--bar</code>.</p>
  <p>I am currently using this approach to achieve this, but it's a bit cumbersome:</p>
  <pre><code>from flask_wtf import FlaskForm
  import wtforms as wtf
  
  class FooForm(FlaskForm):
      FORM_NAME = 'foo-form'
      bar =  wtf.StringField('Bar', render_kw={'id': f'{FORM_NAME}--bar'})
  </code></pre>