On Tuesday, April 3, 2012 8:14:54 AM UTC-4, spyker wrote:
>
> How do I set the text of the submit button when selectable is used in the 
> grid?
>
> I have tried:
>
> form = SQLFORM.grid(query, fields = fields, 
>                             create = False,
>                             orderby = db.akb_articles.title, maxtextlength 
> = 180,
>                             editable = False, deletable = False,
>                             selectable = lambda ids: skrap_artikels(ids),
>                             details = False,
>                             links = links,
>                             ui = 'jquery-ui')
> form.submit_button = T('Delete selected articles')
>

I'm not sure if there is an option to set it directly, but you can set it 
via the server-side DOM as follows:

form.element('.web2py_table input[type=submit]')['_value'] = T('Delete 
selected articles')

Anthony 

Reply via email to