title: Link HTML form to Django field
body: <p>I am new to HTML, my problem is I can't make a form field to be linked to the form.field I try to link with. I had to write an HTML form manually and not simply use the {{form.field}} because I am using a datepicker with JQuery. </p>
  
  <pre><code>&lt;div class="fieldWrapper"&gt;
    {{ form.valida_desde.errors }}
      &lt;label for="id_valida_desde"&gt;Válida desde:&lt;/label&gt;
      &lt;input  type="text" data-date-format="mm/dd/yy" id="valida_desde"&gt; 
  &lt;/div&gt;
  </code></pre>
  
  <p>I could easily render this required field by doing:</p>
  
  <pre><code>{{ form.valida_desde.errors }}
  {{ form.valida_desde }}
  </code></pre>
  
  <p>But that would not work with datepicker. So, what do I do so that the first form saves the data to form.valida_desde field, which is a DateField BTW.</p>
  
  <p>The Jquery needed at the bottom, it works OK</p>
  
  <pre><code>&lt;script&gt;
  $(function() {
    $( "#valida_desde" ).datepicker();
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>Actually is pretty funny for the fact that I just found the answer after looking for more than 3 hours.</p>
  
  <pre><code>        &lt;div class="fieldWrapper"&gt;
        {{ form.valida_desde.errors }}
          &lt;label for="id_valida_desde"&gt;Válida desde:&lt;/label&gt;
          &lt;input  type="text" name="valida_desde" data-date-format="mm/dd/yy" id="valida_desde"&gt; 
      &lt;/div&gt;
  </code></pre>
  
  <p>Adding the name attribute made it, I did that but tried something like form.valida_desde and even {{ form.valiad_desde }}</p>