Use initial, where 1 is my db key,

field1 = forms.ModelChoiceField(..., initial=1,...)

On Aug 25, 4:38 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am using theModelChoiceFieldto provide a filtered set of choices
> on a profile form and I was wondering how I can set the initial value
> of the select box.  In other words I want to set the initial value of
> the form to the value retrieved from the database when a person is
> editing or updating the form.
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to