I was looking at the code in gucon.sqlform
elif (field.type.startswith('reference ') or
field.type.startswith('list:reference ')) and \
hasattr(field.requires,'options'):
value_input = SELECT(
*[OPTION(v, _value=k)
for k,v in field.requires.options()],
**dict(_id=_id))
elif field.type == 'integer' or \
field.type.startswith('reference ') or \
field.type.startswith('list:integer') or \
field.type.startswith('list:reference '):
value_input =
SQLFORM.widgets.integer.widget(field,field.default,_id=_id)
else:
value_input = INPUT(
_type='text', _id=_id, _class=field.type)
Can this be enhanced to view Selection Dropdown with the values for all the
fields. I have not much experience in web2py, so can some one please
suggest a change here.
On Wednesday, October 23, 2013 9:01:23 AM UTC+5:30, Sarbjit wrote:
>
> Can someone please help.
>
> On Tuesday, October 22, 2013 4:39:00 PM UTC+5:30, Sarbjit wrote:
>>
>> I am using GRID for displaying my database results. I want to use search
>> feature provided by GRID/SMARTGRID where users can build queries and get
>> the results. I want to have a drop down field populated with the values
>> defined in the database for the fields which are defined as strings in
>> database.
>>
>> In my case, some fields needs to have exact match and are used very
>> frequent for searching the records. Since it is very difficult to fill in
>> the exact name every time you are searching the records using that field, I
>> want that for few fields, it should present a drop down.
>>
>> Can some one please suggest me on how on to do this.
>>
>> Thanks
>> Sarbjit
>>
>
--
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/groups/opt_out.