More info.....

I found that the problem is that my "MultipleChoiceField" and
"ChoiceField" fields are not behaving.  As I added additional fields,
such as CharField, it became more clear what was happening.

My MultipleChoiceField is being rendered with the
CheckboxSelectMultiple() widget and the ChoiceField is being rendered
with the Select() widget.  I have searched high and low and finally
found some documentation in the Django docs that references this.  You
can see it here: 
https://docs.djangoproject.com/en/dev/ref/forms/widgets/#radioselect.
It mentions that "New in the Development Version" that you should be
able to iterate over the checkboxes or radio buttons to remove the
<li> tags.  But, I have not been able to do this.  I am using the
1.4c1.  Maybe that's different from the development version.

Let's say for a minute that the 1.4c1 release does not include this
feature.  I know that I could approach the problem with CSS.  But,
that feels like a "work around" to me.  And, I don't like work
arounds.  So, here's my question, is there not a built in way to
render these fields with these widgets without the bullets that <LI>
tags create?  It seems like the default would be to not have them.

Thanks


On Mar 7, 3:23 pm, backdoc <backdoc...@gmail.com> wrote:
> I am having trouble changing the way the HTML in my form fields is
> presented.  I've been reading the docs (https://docs.djangoproject.com/
> en/dev/ref/forms/api/#outputting-forms-as-html).  I've done this in
> previous versions.  But, it doesn't seem to work now.
>
> No matter if I use form.as_p or form.as_table, I always get <li>.
>
> I am running:
>      django-admin.py --version
>      1.4c1
>
> This is my form:
>
>      {% block left %}
>        <form action="/search/" method="post">{% csrf_token %}
>          <input type="submit" value="Search" />
>          {{ searchForm.as_p }}
>        </form>
>        <br/>
>      {% endblock %}
>
> TIA

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to