Hi All, My question is about expanding form on dynamically for example. we have two tables. company and address now did SQLFORM.factory(db.company,db.address)
Now requirement is says that where company can have multiple address so i need a button for add more address. On click we need to append form. Can anybody provide the specific solutions. On Monday, 17 February 2014 20:43:00 UTC+5:30, Richard wrote: > > That an option... The other option is to wrap IS_IN_DB() into > IS_EMPTY_OR()... But it is not garanti that the concerning field will be > filled... > > Richard > > > On Sat, Feb 15, 2014 at 3:48 PM, ksotiris <sotiris...@gmail.com > <javascript:>> wrote: > >> Hello web2py-users, I am new to web2py framework. I have a question >> about the followings: >> >> >>> @Steve it exactly what I have in mind, except in my case the form has to >>> be generic for many differents tables, but if you only one table to bunch >>> insert, that way it works fine... >>> >>> Notice, if you create more inputs then the number your users will need >>> (not 3 records for instance) you get in trouble if you have not null >>> requires or IS_IN_DB or other validators)... So I use an other form to >>> catch the number of input the user is needing and I pass it buy the URL as >>> a vars something like that : >>> >>> URL(c='controller', f='bunch_func', vars=dict(nb_inputs=3)) >>> >>> Then I use it in range function : >>> >>> for i in range(0, int(request.vars.nb_inputs)) >>> >> >> Is there another more easy way to do this ? >> >> For example why not to have an option before validate the posted data to >> delete emtpy row - fields of the form and post only row - fields with no >> empty values ??? >> I have already try a lot of things but nothing is working. >> The batch input form is usefull and i think must be an easy way for this. >> The above is working but is not so practical for the end user of the >> batch input form. >> >> >> -- >> 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+un...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- 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.