Looks like it has been changed to #w2p_keywords. Anyway, it may be better 
to use the name attribute:

grid.element(_name='keywords')

Anthony

On Wednesday, February 19, 2014 7:44:36 AM UTC-5, horridohobbyist wrote:
>
> I tried this. It returns empty on grid.element('#w2p_directory_keywords').
>
> Not that it matters. I've decided to keep the Search function as is.
>
>
> On Monday, 17 February 2014 23:18:28 UTC-5, Anthony wrote:
>>
>> Note, if you don't want to create a new search widget but just want to 
>> remove the default Javascript widget and instead have a basic search input 
>> field, you can do:
>>
>>     search_input = grid.element('#w2p_directory_keywords')
>>     search_input and search_input.attributes.pop('_onfocus')
>>
>> That simply removes the "_onfocus" event handler, which disables the 
>> Javascript functionality of the widget.
>>
>> Anthony
>>
>> On Monday, February 17, 2014 11:12:52 PM UTC-5, Anthony wrote:
>>>
>>> Yes. The "searchable" argument can be a callable that builds a query 
>>> based on the keywords, and there is a "search_widget" argument you can use 
>>> to generate a custom search widget. I suggest you check out the 
>>> SQLFORM.grid code in gluon.sqlhtml to see how they work.
>>>
>>> Anthony
>>>
>>> On Monday, February 17, 2014 11:02:03 PM UTC-5, horridohobbyist wrote:
>>>>
>>>> I'm using SQLFORM.grid for my application. It's very powerful and saves 
>>>> me a lot of work. However, I would like to alter/customize the search 
>>>> function in the grid. Is there a way for me to do this?
>>>>
>>>> Thanks.
>>>>
>>>

-- 
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.

Reply via email to