Hi Lucas! I had similar problem and here is my solution: For search I use SQLFORM.grid with buttons (button per row) having data-attributes, for example, in your case attrs may be: data-client_id, data-client_name with corresponding values Then I use LOAD() with ajax_trap=True to embed SQLFORM.grid to the main page (also it may be turned into modal dialogue using bootstrap ) There is the hidden field at the main page to hold selection data that would be sent (client_id) and the html-element to represent the selection (client_name) Now, all that's left to do - little script, like this: $(document).on('click', ':button[data-client_id]', function(e) { $('#client_id_hidden_field').val( $(e.target).data('client_id') ); $('#client_name_html_elem').html( $(e.target).data('client_name') ); } )
On Sunday, January 17, 2016 at 5:54:32 PM UTC+3, lucas wrote: > > oh, i forgot to mention, that i know how to do an ajax query and pass post > variable to it using web2py. i don't know the best javascript/jQuery > method for creating and displaying the proper HTML code and > inputs/buttons/and such, and then pass the result back to the main parent > page. > -- 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.