I'm don't know why that is evil (would you explain?).  Anyway,  I'm
using that to iterate through all the check boxes (and also place
other components) on the page manually - so I can format their
placement how I want.

So the exposes will fix the checkbox issue?

On Fri, Nov 21, 2008 at 1:47 PM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> You are doing something evil in page1.html: {{=form[0][0][1]}}
>
> Anyway, given your custom forms and I assume you do not want to change
> them. you need to replace
>
> @t2.requires_login(next='login')
> def page1():
>    stus=db(db.student.id).select()
>    if stus:
>        form=t2.update(db.student,db.student.id==1)
>    else:
>        form=t2.create(db.student)
>    return dict(form=form)
>
> with
>
> @t2.requires_login(next='login')
> def page1():
>    stus=db(db.student.id).select()
>    if stus:
>        db.student['exposes']=['name','id']
>        form=t2.update(db.student,db.student.id==1)
>    else:
>        db.student['exposes']=['name']
>        form=t2.create(db.student)
>    return dict(form=form)
>
> Massimo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to