Closed GoogleCodeExporter closed 9 years ago
I am sorry but I do not see/understand the problem you are reporting. Could you
be a
bit more specific ?
Thanks
--yml
Original comment by yann.ma...@gmail.com
on 23 Jul 2008 at 8:40
The 2 "string"s need to be the same in for="id_answer" and id="id_1_1-answer".
The general form is for="id", id="id", where "id" is unique for each question.
Given that all the questions have the same key ("id_answer") I am guessing
django's
{{ bound_field }} rendering is doing the right thing, and
for="id_{{bound_field.name}}" needs to do the same thing. the way I read the
docs I
quoted, that line should be doing the same thing, but it isn't.
I am going to post this to dj-users list and see if anyone has any ideas.
Original comment by cfkars...@gmail.com
on 23 Jul 2008 at 10:23
"fixed" (I don't understand why the old code didn't work, but I think I will
let the
nfa dust settle)
carl@dv67:~/dj/lib/django-survey/survey$ svn diff templates/newforms/field.html
Index: templates/newforms/field.html
===================================================================
--- templates/newforms/field.html (revision 74)
+++ templates/newforms/field.html (working copy)
@@ -1,6 +1,6 @@
{% if bound_field.errors %}<p>{{ bound_field.errors }}</p>{% endif %}
-<label for="id_{{ bound_field.name }}">{{ bound_field.label }} :</label>
+{{ bound_field.label_tag }}
Original comment by cfkars...@gmail.com
on 23 Jul 2008 at 11:09
and nothing to do with this issue, but as long as we are looking at that code,
I like
this better:
svn diff templates/newforms/field.html
Index: templates/newforms/field.html
===================================================================
--- templates/newforms/field.html (revision 74)
+++ templates/newforms/field.html (working copy)
@@ -1,7 +1,6 @@
{% if bound_field.errors %}<p>{{ bound_field.errors }}</p>{% endif %}
-<label for="id_{{ bound_field.name }}">{{ bound_field.label }} :</label>
-{% if bound_field.field.required %}<span class="required"><sup> *
</sup></span>{%
endif %}
+<span class="{{ bound_field.field.required|yesno:"required,optional"}}"> {{
bound_field.label_tag }} </span>
{% if bound_field.help_text %} <span class="helptext">({{ bound_field.help_text
}})</span> {% endif %}
{% if bound_field.form.question.get_image_url %}<img src="{{
bound_field.form.question.get_image_url }}"</img>{% endif %}
{% if bound_field.form.choice.get_image_url %}<img src="{{
bound_field.form.choice.get_image_url }}"</img>{% endif %}
Original comment by cfkars...@gmail.com
on 23 Jul 2008 at 11:24
Fixed in r 87
Original comment by yann.ma...@gmail.com
on 24 Jul 2008 at 10:56
Original comment by yann.ma...@gmail.com
on 24 Jul 2008 at 10:56
Original issue reported on code.google.com by
cfkars...@gmail.com
on 23 Jul 2008 at 6:58