title: Accessing Field Metadata in a ModelForm with Custom Widget
body: <p>So I have a Model, ModelForm, and Custom Widget.  My goal was to access the fields verbose_name and help_text in the custom widget.  I couldn't figure out how to get that data in the Widget so I had to pass it to my new SmartTextInput widget in the Model Form?</p>
  
  <p>This just seems hacky, is there a better way?</p>
  
  <p>Here is the ModelForm</p>
  
  <pre><code>class LeadForm(ModelForm):
    class Meta:
      model = Lead
  
      widgets = {
        'first_name': SmartTextInput(label=model._meta.get_field('first_name').verbose_name),
        'middle_name': SmartTextInput(label=model._meta.get_field('middle_name').verbose_name),
        'last_name': SmartTextInput(label=model._meta.get_field('last_name').verbose_name),
      }
  </code></pre>
  
  <p>Here is the custom widget</p>
  
  <pre><code>class SmartTextInput(TextInput):
  
    def __init__(self, attrs=None, label=None):
      super(TextInput, self).__init__(attrs)
  
      self.label = label
  
    def render(self, name, value, attrs=None, label=None):
      input_html = super(TextFieldWidget, self).render(name, value, attrs)
  
      html = """&lt;label class="label"&gt;""" + self.label + """&lt;/label&gt;"""
      html = html + input_html
  
      return mark_safe(html);
  </code></pre>