Oh perfect Thanks Massimo, I was able to customize it the way i
wanted... But I dont understand this part of your code:

And what do you meant here? "in gluon.tools.Auth this is going away
and you will use..."


      " db.table.field.writable=False
        db.table.field.readable=True
      "
What do you mean here ? I guess this is to have a read-only/Writable
fields right?

Thanks !


On Jan 25, 2:04 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> Within T2 you can shose
>
> db.t2_person.exposes=[...list of fields that you want in register ...]
>
> in gluon.tools.Auth this is going away and you will use
> db.table.field.writable=False
> db.table.field.readable=True
>
> You can cutomize any forms with more or less this syntax
>
> <form>
> ...
> <input name="X" value="{{=form.latest.X}}" />
> {{if form.errors.X:}}<div class="error">{{=form.errors.X}}</div>
> {{pass}}
>
> ...
> {{=form.hidden_fields()}}
> </form>
>
> where X is a field name.
>
> Massimo
> On Jan 25, 12:49 pm, Yannick <ytchatch...@gmail.com> wrote:
>
> > Ok here is an example. Let's say in the controller i have the
> > following code:
>
> >        response.menu=[
> >           [’login’,False,t2.action(’login’)],
> >           [’search’,False,t2.action(’searchItems’)],
> >           [’register’,False,t2.action(’register’)]]
>
> >          def register(): return dict(form=t2.register())
> >          def login(): return dict(form=t2.login())
> >          def logout(): t2.logout(next=’login’)
>
> >          def searchItems():
> >             search=t2.search(db.items)
> >             return dict(search=search)
>
> >  And in the login.html we have something like:
>
> >         <div class="frame">
> >           <h2>Login</h2>
> >            {{=form}}
> >         </div>
> >  And in the registration.html we have something like:
> >        <div class="frame">
> >          <h2>Register</h2>
> >          {{=form}}
> >        </div>
>
> > The registration, Login pages for example display some fields that i
> > don't want, how can I choose which fields to display ?
> > - Also How can I customized the layout to make it look nice.
> > - Also for the search criterion, how can i choose which one to display
> > and how to display it (Layout)
>
> > Thanks for your attention and help.
>
> > On Jan 24, 7:42 pm, jlegler <jleg...@gmail.com> wrote:
>
> > > There are many ways to do it depending on what you want to do.  Can
> > > you give us an example of what you would like to do?
>
> > > On Jan 24, 1:50 pm, Yannick <ytchatch...@gmail.com> wrote:
>
> > > > Hello mate,
> > > > Anyone knows how to customize the form ( Register, Login, etc...)
> > > > return by T2 application Plug-in ?
>
> > > > Thanks for your help !
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to