On Tue, Jan 20, 2009 at 11:17 AM, shogunm...@googlemail.com
<shogunm...@googlemail.com> wrote:
>
> Thanks guys, I'm gonna give this a try!
>
> Mike.
Hi, I'm having the exact same problem you had and I can't find a nice
way around it.
I want the name of the currently logged in user to be pre-selected in
a combo box in the form.

The form is used to create a new object in the database. What I've
found as the main problem is that when I display the form for the
first time, if it's bound it throws validation errors (because I don't
want to pre-populate all the required fields) and if it is not bound
it just doesn't display the pre-populated data.

My workaround at the time is to pass a flag to the template so it
doesn't show the errors but I still don't think that is the best way
to do it.

Any help would be appreciated.

--~--~---------~--~----~------------~-------~--~----~
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