Something like this: User inputs x amount of days, using jquery I will have buttons of some sort that represent x amount of days which appear when the user specifies x. They will then be able to click each button, where an instance of the form is displayed and they can enter information for that day then they can click another day and another instance of the same form generates. Once all forms have been filled accordingly, the user then submits the form at once. That is, if it is possible to do this way.
I'm trying to take Massimo's example and work with that, only instead of specifying a range I need to link it to the form variable where the user submits the x amount so that the amount of form instances are created dynamically, not much success so far. On Thursday, January 14, 2016 at 7:02:37 AM UTC-8, Anthony wrote: > > Are you wanting the user to fill all forms and submit them at once, submit > one form at a time (but remaining on the same page in order to submit > additional forms), or just submit one of the many forms and then have the > page reload/redirect? > > On Wednesday, January 13, 2016 at 11:58:02 AM UTC-5, aetag...@gmail.com > <javascript:> wrote: >> >> I'm not sure if this is even possible, but if it is..how would something >> like this work: >> >> You prompt the user for an x amount of days, then with javascript and >> jquery you have x amount of buttons appear. Each button is an instance of >> the form. There is a variable within the javascript that holds the amount >> x. So for each instance of x, the user fills out the same form but with >> different values for each day. In the db module containing the sqlform, >> there is a function that takes in each instance and performs what it needs >> to for each separate instance. >> >> Also, if you are in views, how can you share a variable that is used in a >> script to python code in the same views, or in the db models file? >> > -- 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.