Hi,
I've this form:
class PlayerForm(forms.Form):
challengeable = forms.BooleanField(required=False)
show_name = forms.BooleanField(required=False)
message_move = forms.BooleanField(required=False)
message_confirm = forms.BooleanField(required=False)
country = forms.ModelChoiceField(queryset=Country.objects.all())
and in the template I use this tag:
{{ form.country }}
Can I show the selected field from the current user?
example:
If the user country is 'ALB', show this in the template:
..........
<option value="1">AFG</option>
<option value="2">AHO</option>
<option value="3" selected="selected" >ALB</option>
<option value="4">ALG</option>
<option value="5">AND</option>
<option value="6">ANT</option>
..............
thanks,
Alfredo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---