Many moons have passed since I last looked at this but if I remember correctly I went for a class that was based on SQLFORM (currently sitting in the back burner).
SQLFORM mixes processing and presentation very tightly, which is fine for starters but you soon get to a point where you want to keep the processing but have a completely different presentation. My initial approach was the 'custom form' patch which is fine but somewhat cumbersome. The lastest is CSS based and it would allow easy form customization if I can iron out some pending issues. I would love to hear your ideas, specially about CSS. Denes. On Dec 14, 12:51 pm, Thadeus Burgess <thade...@thadeusb.com> wrote: > I would like to accomplish the output of the below, but use SQLFORM, > and not mess with sqlform.custom. > > form = FORM( > FIELDSET( > LEGEND("Your Information"), > LABEL("Name:", _for="name"), > INPUT(_name="name"), > LABEL("Email:", _for="email"), > INPUT(_name="email"), > LABEL("Country:", _for="country"), > INPUT(_name="country"), > ), > FIELDSET( > LEGEND("Account Info"), > LABEL("Username:", _for="username"), > INPUT(_name="username"), > LABEL("Password:", _for="password"), > INPUT(_name="password"), > LABEL("Password Again:", _for="passwordrpt"), > INPUT(_name="passwordrpt"), > ), > ) > > I am thinking an interface that allows mixing and matching of DIV > based objects and fields. > Should I a new form class be created, or a class that uses an existing > forms sqlform.custom? > > Does anyone have any ideas on the best way to implement the functionality? > > SQLFORM.factory( > FIELDSET( > LEGEND("Your Information"), > db.accounts.name, > db.accounts.email, > db.accounts.country, > ), FIELDSET( > LEGEND("Account Info"), > db.accounts.username, > db.accounts.password, > db.accounts.passwordrpt, > ), > ) > > Also on a side note, You can get the same functionality of forms (the > table like layout) with pure CSS. I keep wondering why a TABLE was > chosen for default forms, since it makes it impossible to style the > form **layout** with CSS. > > -Thadeus -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.