On Thursday, 14 January 2016 17:55:41 UTC, Sayse wrote:
>
> Yea I've heard of it. Have they managed to achieve this? I'd be interested 
> to see how they've done it if so... 
>
> I was hoping to find a way to do this with native django if possible 
>

One way that might work is to subclass the CheckboxInputWidget, and in the 
new widget overide the render method - but there looks like a lot of deep 
Django Magic in that method : 
https://docs.djangoproject.com/en/1.9/_modules/django/forms/widgets/#CheckboxInput

Or - look at changing the Form render method - again involving lots of 
Django Magic

Or - Accept that you can't do that (as you are trying to including one 
widget (Input) inside the HTML tags for another (Label), and compromise 
with manual ordering and being more explicit in your form : For instance 
using {{ field.label_tag }} Example here : 
https://docs.djangoproject.com/en/1.9/topics/forms/#looping-over-the-form-s-fields

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b4b9f561-4bc2-434d-9cf7-8d5235de372f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to