title: django - form has no errors but form.is_valid() doesn't validate
body: <p>I have a form that for some reason it it doesn't throw any errors (if user adds data in the text field) but <code>form.is_valid()</code> doesn't validate. Any ideas?</p>
  
  <p>forms.py:</p>
  
  <pre><code>class MyForm(forms.Form):
      title = forms.CharField(widget=forms.TextInput(attrs={'class':'titleField')) 
  </code></pre>
  
  <p>mytemplate.html</p>
  
  <pre><code>  &lt;form action="" method="post" name="form"&gt;{% csrf_token %}
    {{ form.title.errors }}
    {{ form.title }}
    &lt;input type="submit" name='submit_button' value="Post" /&gt;
    &lt;/form&gt;
  </code></pre>
  
  <p>views.py:</p>
  
  <pre><code>      if 'submit_button' in request.POST:
              form = MyForm(request.POST)
              if form.is_valid():
                 cd = form.cleaned_data 
                 title = cd['title']
                 g = MyData(title='title')   
                 g.save()
  
         else:
              form = MyForm() 
  </code></pre>