Dear Simon & villas, Thanks for your replies. Let me digest your ideas by putting them to work. Then I can ask for your help on fine-tuning the form. --------------------------------
In reply to villas's post, I have this to write--- Dear villas, Seems that you have got my problem almost correctly, with one difference. Let me brief the problem here again. A form is handling table-1, table-2, table-3. User will manipulate the data so that there may be an insert statement for table-1, update statement for table-2, delete statement for table-3 (or any other combination of DML statements for each table). I can't hardcode DML statements for tables, since I can't predict which table would be receiving what DML statement. If that were the case, I would have used form=SQLFORM and then form[0].insert(2,TR(...)) OR use of SQLFORM.Factory As such, I could not get started by writing a controller (since I am stuck-up with how to tackle this logic). (If you require, I can attach a screenshot of such form prepared in VFP to get the idea of why this is required.) So, in a nutshell, my question is this --- How to identify which DML statement is required for which table. Which components of web2py can be used in building a generic controller for handling such kind of form. Thanks, Vineet ===========================================