On Thu, 2009-02-05 at 17:22 -0800, min wrote: [...] > If use request.GET['selectM'].strip() in the following example, we can > only get the the 'value' of selected item. > > <html> > <head><title></title></head> > <body> > <form method="get" action="." > > <select multiple="multiple" id="selectM"> > <option value='test1'>bbb</option> > <option value='test2'>ccc</option> > <option value='test3'>ddd</option> > </select> > <input type="submit" value="submit" /> > </from> > </body> > </html> > > Is there any way to get both value and text from the SelectMultiple > widget the in the views.py?
No, because HTML forms don't work that way. Only the value of the "value" attribute is submitted. You (the page designer) already know what the corresponding text for that option is, so the form shouldn't need to tell you about it again. It submits the minimum necessary. Regards, malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---