Re: Get id attribute in a form

2010-03-06 Thread leoz01
Thanks for your answers, I don't understand why there is no id getter or property while it is important for javascript. I think i'll override the render method like you Sam. Thanks again ! On 4 mar, 12:17, Sam Lai wrote: > On 25 February 2010 07:05, leoz01 wrote: > > >

Re: Get id attribute in a form

2010-03-02 Thread leoz01
Nobody could answer me? Maybe I haven't ask well? On 24 fév, 21:05, leoz01 wrote: > Hello, > > i have a simple question, how can i get the id attribute (which > correspond to html id) from a form's field ? > > example : > class MyModel(...): >    test = CharFie

Get id attribute in a form

2010-02-24 Thread leoz01
Hello, i have a simple question, how can i get the id attribute (which correspond to html id) from a form's field ? example : class MyModel(...): test = CharField(...) class MyForm(ModelForm): class Meta: model = MyModel I search for something like : f=MyForm() f.fields['test'].id

Re: Forms ModelMultipleChoiceField with checkboxes?

2009-11-22 Thread leoz01
I think the easiest way is to make your own widget or otherwise you can make your own form field. On 19 nov, 10:19, Benjamin Wolf wrote: > Hello, > > I'm using Django's form and ModelMultipleChoiceField. > ModelMultipleChoiceField produces a select list with multiple options. > Is it possible t