Question, how to get the list of drop down menu from request.vars using
manual form as in the book example (chapter 7) below.
If I do the followiing. I get the input values via request.vars but it
doesn't work for the drop down.
<form enctype="multipart/form-data" action="{{=URL('default',
'form_search')}}" method="post">
<tbody>
<tr>
<td>
<input type="text" name="name" class="project_listsec_top_inpt" />
</td>
<td>
<select class="project_listsec_top_slct">
<option>All</option>
<option>Option 1</option>
<option>Option 2</option>
<option>Option 3</option>
<option>Option 4</option>
</select>
</td>
<td>
<input type="submit" value = "submit" class="project_listsec_top_btn" />
</td>
</tr>
</tbody>
</form>
In controller,
If I insert anything to the input field I get
request.vars
<Storage {'name': 'hello'}>
But for drop down select if I pick option1
request.vars
<Storage {'name': ''}>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.