diff options
| author | Karen Tracey <kmtracey@gmail.com> | 2009-12-12 18:22:09 +0000 |
|---|---|---|
| committer | Karen Tracey <kmtracey@gmail.com> | 2009-12-12 18:22:09 +0000 |
| commit | 8bb3763c2bb6ae53e2ce36c5f2ed3c3e4545c90f (patch) | |
| tree | 63d7e2fc1ffc4b6ef5b0a268301aba74cb8d28a5 /tests/regressiontests/forms | |
| parent | c1a8bd6779c2ff907d2d80b98d79c8ab10d642ae (diff) | |
[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
Diffstat (limited to 'tests/regressiontests/forms')
| -rw-r--r-- | tests/regressiontests/forms/forms.py | 7 |
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> + """ |
