HI,
I have a problem in getting values from an HTML SELECT MULTIPLE TAG
through request.POST
--------------------------------------------------------------------------------------
My form.html page contains

<form action="demo/success/" name="demo" method="POST">
<select multiple="true" id="colour" name="colour">
<option value="1">Red</option>
<option value="2">Pink</option>
<option value="3">Black</option>
<select>
<form>
---------------------------------------------------------------------------
My view file: success.py

print "POST data--->", request.POST
print "Selected Colours--->",request.POST['colour']

------------------------------------------------------------------------------
Output:

POST data--->request.POST <QueryDict: {u'colour': [u'2', u'3', u'1']}
Selected Colours--->1
---------------------------------------------------------------------------------
Issue that I found out is "The variable 'colour' gets overwritten
everytime when the user selects different values". Then how come it is
possible that the request.POST shows all selected values. And why am
not getting the same when i extract value from the variable 'colour'.
Any help would be thankful
--~--~---------~--~----~------------~-------~--~----~
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