Hi,
   

I am new to Web2Py and would like to achieve 'selectable' like 
functionality through links but I am not sure how to pass the ID and flag 
from checkbox to the controller function 
*Why links why not selectable?* 

      I might need multiple columns with checkbox and links is the easiest 
way to achieve it. Also to the controller I wanted to pass both the 
selected and not selected ids and their flags.
*why both selected and not selected?* 

       For the corresponding ids I would like to update the flag in 
database to 1 or 0 depending on whether its checked or not.


*Code?*

testlink=[dict(header="Actioned",body=lambda row: 
INPUT(_name='actioned',_type="checkbox",_value=id))]

grid = SQLFORM.grid(query
    ,editable=True
    ,details=True
    ,deletable=True
    ,create=True
    ,links=testlink
    ,links_placement='left'
    ,showbuttontext=True
    ,fields=FIELDS
    )
grid = FORM(grid,INPUT(_type="submit",_name="testsubmit",_value="testsubmit"))

if grid.process().accepted:
    print "submit successful"

 



-- 

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