summaryrefslogtreecommitdiff
path: root/tests/regressiontests/forms
diff options
context:
space:
mode:
authorKaren Tracey <kmtracey@gmail.com>2009-12-12 18:18:31 +0000
committerKaren Tracey <kmtracey@gmail.com>2009-12-12 18:18:31 +0000
commit9c4bd2aa33fed8ba8ba328ae487e80135ac1498f (patch)
tree5c8e0155f199f5651b88bb41407d618ca5a571c2 /tests/regressiontests/forms
parentac8da7b36f353ffc225ee27b0aeb96f8912b9362 (diff)
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.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/forms')
-rw-r--r--tests/regressiontests/forms/forms.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/regressiontests/forms/forms.py b/tests/regressiontests/forms/forms.py
index bf9623fe77..b204580131 100644
--- a/tests/regressiontests/forms/forms.py
+++ b/tests/regressiontests/forms/forms.py
@@ -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>
+
"""