links = [lambda row: BUTTON('Profile',_onclick="jQuery('#id5').val('%s'); ajax('new', ['id'], 'ab');" % str(row.id), **{'_data-toggle': 'collapse', '_data-target' : '#ab', '_class' : 'two btn btn-success', '_type' : 'submit', '_value' : 'Submit', '_id' : 'ld'} )] # Companysearch method grid links to create button
def new(): return LOAD('default','companypage.load',ajax=False, ajax_trap=True, args=[request.vars.id]) def companypage(): a = request.args(0) company = db((db.Company.id==a)).select().first() record = db.Company(request.args(0)) form3=SQLFORM(db.Company,record=record,formstyle="bootstrap") if form3.process(session=None, formname='form123213').accepted: response.flash = 'Working' return locals() <form><input class="" id="id5" name="id" value="" /></form> #companysearch.html <div class="collapse" id="ab"> </div> #also within companysearch.html -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.