#27270: A form may include HTML attributes such as maxlength
-------------------------------+---------------------
     Reporter:  Kifsif         |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Documentation  |    Version:  1.10
     Severity:  Normal         |   Keywords:  formset
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+---------------------
 The documentation reads: "Just like when using a normal Form, each form in
 the formset may include HTML attributes such as maxlength for browser
 validation." (https://docs.djangoproject.com/en/1.10/topics/forms/formsets
 /#formset-validation)

 NB: **form** may include HTML attributes such as maxlength.

 What astonishes me: this is not the form that may include maxlength. This
 is a **field in Django and input tag in HTML**. Well, a form can contain
 maxlength neither in Django nor in HTML as far as I know.


 Example:

 {{{
 class ArticleForm(forms.Form):
     title = forms.CharField(max_length=5)
 }}}



 Which results in:


 {{{
 <table>
     <tr>
         <th>
             <label for="id_form-0-title">Title:</label>
         </th>
         <td>
             <input id="id_form-0-title" maxlength="5" name="form-0-title"
 type="text" value="Test" />
         </td>
     </tr>
 </table>
 }}}


 Offered wording: Just like when using a normal Form, **each form field in
 each form in the formset** may include HTML attributes such as maxlength
 for browser validation.

--
Ticket URL: <https://code.djangoproject.com/ticket/27270>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.ccf59d08a5bf72c83c73b162240d08af%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to