title: Customizing Flask-WTF or WTForms
body: <p>I'm trying to integrate Flask as the backend for the UI I'm working with.</p>
  
  <p>Unfortunately the UI already has the CSS and JavaScript set up for the forms (to accommodate for the UI but also for older versions of IE and other cases).  </p>
  
  <p>The first problem that I'm running into is that there is already a label for the fields.  If I use the <strong>.labels</strong> attribute in the template:</p>
  
  <pre><code>{{ form.username.label }}
  </code></pre>
  
  <p>then it creates an extra label which I can't seem to add any attributes to for the CSS/JavaScript.  However if I leave the <strong>.label</strong> attribute off then it creates an extra blank text field above the username input.</p>
  
  <p>The code in my <strong>forms.py</strong> file is: </p>
  
  <pre><code>class LoginForm(FlaskForm):
      username = StringField('Username', validators=[DataRequired()])
  </code></pre>
  
  <p>Am I missing something on this?</p>
  
  <p>The second part is adding attributes to the form itself.  I've found how to add the HTML <strong>class</strong> attribute using <strong>class_='classname'</strong>, but the Flask-WTF and WTForms documentation don't seem to touch on any other attributes (such as <strong>autcomplete="off"</strong> or <strong>placholder="username"</strong>) </p>
  
  <p>Is there some way to accomplish this with Flask-WTF or WTForms that I'm just missing?  Am I limited to manual attributes and/or Jinja macros for this type of functionality?  I can't imagine this is something that would be missing form WTForms and Flask-WTF but I also don't see it mentioned anywhere in the docs or on Google/StackOverflow.</p>
  
  <p>Thanks!</p>