On Jan 27, 9:23 am, "canen" <[EMAIL PROTECTED]> wrote:
> my_field = ChoiceField(choices=[(1, 1), (2, 2)], initial=1)
> doesn't work?
Yes, thank you.
For information, here is more details.
I have a view function called bill_clone to build a new bill form
prepopulated with the values from a prev
my_field = ChoiceField(choices=[(1, 1), (2, 2)], initial=1)
doesn't work?
On Jan 26, 7:04 pm, "Denis Frère" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm discovering newforms.
>
> It works pretty well, but I can't manage to give an initial selection
> in a ChoiceField (Select widget).
> I tried to
Hi all,
I'm discovering newforms.
It works pretty well, but I can't manage to give an initial selection
in a ChoiceField (Select widget).
I tried to read the code. I understand I have to give a "value"
parameter to Select.render(), but how do I pass that value in the form
initial data dictionary
3 matches
Mail list logo