mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
[1.1.X] Fixed #11632: Fixed the id for hidden initial widget so that it is different from the id for its visible counterpart. Thanks geber@datacollect.com and Mark Lavin.
r11826 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@11827 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -1807,4 +1807,11 @@ True
|
||||
>>> [f.name for f in form.visible_fields()]
|
||||
['artist', 'name']
|
||||
|
||||
# Hidden initial input gets its own unique id ################################
|
||||
|
||||
>>> class MyForm(Form):
|
||||
... field1 = CharField(max_length=50, show_hidden_initial=True)
|
||||
>>> print MyForm()
|
||||
<tr><th><label for="id_field1">Field1:</label></th><td><input id="id_field1" type="text" name="field1" maxlength="50" /><input type="hidden" name="initial-field1" id="initial-id_field1" /></td></tr>
|
||||
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user