Re: [web2py] Re: "wizard" style forms in web2py

2012-08-28 Thread Richard Vézina
Tuples are unmutable (you can't change them), so they don't have a replace attribute. I you want to change your the values into your tuples use list instead. Richard On Tue, Aug 28, 2012 at 3:44 AM, Bill Thayer wrote: > The example from the web2py application cookbook runs fine but when I > twe

[web2py] Re: "wizard" style forms in web2py

2012-08-28 Thread Bill Thayer
The example from the web2py application cookbook runs fine but when I tweak it I get 'tuple' object has no attribute 'replace' In the code below, mine is on top named test() for input a test request. The function named wizard came from the cookbook. def tests(): STEPS = { 0: ('db.t

Re: [web2py] Re: "wizard" style forms in web2py

2010-05-29 Thread Robby O'Connor
Okay thank you! P.S. I'm working with Sahana Py (now referred to as Sahana Eden) =) --rob On 5/29/2010 9:37 PM, mdipierro wrote: Yes. The idea is to user request.args(0) to decide the page of the wizard and the relative form. On May 29, 7:36 pm, Robby O'Connor wrote: Okay, Looking at th

[web2py] Re: "wizard" style forms in web2py

2010-05-29 Thread mdipierro
Yes. The idea is to user request.args(0) to decide the page of the wizard and the relative form. On May 29, 7:36 pm, Robby O'Connor wrote: > Okay, > > Looking at this deeper, I there will be a complete form (one covering > one db table; then another covering a completely different database > tabl

Re: [web2py] Re: "wizard" style forms in web2py

2010-05-29 Thread Robby O'Connor
Okay, Looking at this deeper, I there will be a complete form (one covering one db table; then another covering a completely different database table. Let me see if I got this right. Can this implementation idea work for that case? --rob On 5/29/2010 11:19 AM, mdipierro wrote: db.define_tab

[web2py] Re: "wizard" style forms in web2py

2010-05-29 Thread Iceberg
It is always fun to see Massimo asking questions, because he can usually comes up with a clean solution based on some unpopular web2py trick. :) This time, it is the SQLFORM(..., fields=...) that I did not notice. Thanks. :) Thadeus also gives a good suggestion. And this kind of logic is better i

Re: [web2py] Re: "wizard" style forms in web2py

2010-05-29 Thread Thadeus Burgess
I would use the jQuery form wizard plugin. It is very nice and dose the pagination for you. The only issue is if the data in the second step depend on what is in the first step, then you would need to use some ajax/javascript to alter accordingly. -- Thadeus On Sat, May 29, 2010 at 10:39 AM,

Re: [web2py] Re: "wizard" style forms in web2py

2010-05-29 Thread Mathieu Clabaut
Nice idea ! I needed something similar... I'll give a try.. Thanks ! On Sat, May 29, 2010 at 17:19, mdipierro wrote: > db.define_table('mytable', > Field('field1'), Field('field2'), Field('field3'), > Field('field4')) > > make sure they all have defaults. > > def wizard(): > fields=[['

[web2py] Re: "wizard" style forms in web2py

2010-05-29 Thread mdipierro
db.define_table('mytable', Field('field1'), Field('field2'), Field('field3'), Field('field4')) make sure they all have defaults. def wizard(): fields=[['field1'], # first page ['field2','field3'], # second page ['field4']] # third page record_id =i