title: Django: Get the form name or id from template
body: <p>If you have multiple forms </p>
  
  <pre><code>from django import forms
  
  class NameForm(forms.Form):
      your_name = forms.CharField(label='Your name', max_length=100)
  
  class SecondNameForm(forms.Form):
      your_name = forms.CharField(label='Your name', max_length=100)
  </code></pre>
  
  <p>is there a way that, in your template, you can figure out if <code>form</code> in inside <code>context</code> belongs to <code>NameForm</code> or <code>SecondNameForm</code></p>
  
  <p>I have a custom widget that in its html, it uses the <code>id=""</code> identifier (which should be unique in the whole html).</p>
  
  <p>I want to assign the id to something like </p>
  
  <p><code>id="{{form.name}}_{{field.val}}"</code> or
  <code>id="{{form.id}}_{{field.val}}"</code> or</p>
  
  <p>where <code>{{form.name}}</code> and <code>{{form.id}}</code> is some value associated with the form instance and not the form's content.</p>