Hi.

In the following templates file, we can get the value of zip by using
' request.GET['zip'].strip()' in the views.py
<html>
<head><title></title></head>
<body>
        <form method="get" action="." >
             Zip<input id="zip"  type="text" name="zip" value='aaa'/>
             <input type="submit"  value="submit" />
        </from>
</body>
</html>

However, if the 'zip' input was changed into a SelectMultiple widget,
like  how to get both the  value and option from that widget.

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?


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