Changes between Initial Version and Version 9 of Ticket #16304
- Timestamp:
- Oct 15, 2012, 3:47:26 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #16304
- Property Needs documentation unset
- Property Needs tests unset
- Property Triage Stage Unreviewed → Accepted
- Property Version 1.3 → SVN
- Property Summary Forms Need HTML5 'placeholder' attribute → Add HTML5 'placeholder' attribute support to form fields.
- Property Owner changed from to
- Property Status new → assigned
- Property Cc added
- Property Has patch set
- Property Patch needs improvement set
-
Ticket #16304 – Description
initial v9 3 3 To do this in Django currently, you have to do something like: 4 4 5 {{{#!python 5 6 comment = forms.CharField(max_length=200, widget=forms.TextInput({ "placeholder": "Text!"})) 7 }}} 6 8 7 9 However, to do this with a ModelForm is much more complicated: http://bitkickers.blogspot.com/2010/09/django-html5-input-placeholders.html … … 9 11 I suggest that there should be an easier way to set placeholder text in form fields and model form fields: 10 12 13 {{{#!python 11 14 comment = forms.CharField(max_length=200, placeholder="Text!") 15 }}} 12 16 13 17 (This would also be a good starting point for other new HTML5 input elements, such as 'required' and 'email', but those should be separate tickets. The code would be very similar though.)