I did it this way:
In my user.html I had added: {{if request.args(0)=='login':}}
{{=auth.login()}}{{pass}}
Now when I go to registration page I see only my custom registration
form, BUT when I go to login page I see login as well as custom
registration form. Do I have to move my registration form to some
separate page and somehow redirect to it in layout.html ?


On 10 Lip, 10:08, mdipierro <[email protected]> wrote:
> What's the controller?
>
> Anyway:
> You cannot have <html><body>..</html> in there since it extends
> layout.html (html is in there already)
>
> Try this instead.
> {{extend 'layout.html'}}
> {{=form}}
> {{if request.args(0)=='login':}}{{=auth.register()}}{{pass}}
>
> On 10 Lug, 02:55, elfuego1 <[email protected]> wrote:
>
> > I also have problem with submit button. It doesn't work.
>
> > My user.html content:
>
> > {{extend 'layout.html'}}
> > <html>
> > <body>
> > <form action="" enctype="multipart/form-data" method="post">
>
> > <table>
> >   <tr>
> >         <label for="register_login">{{=lbl.login}}</label>
> >         <td>{{=wdgt.login}}</td>
> >   </tr>
> >   <tr>
> >         <label for="password">{{=lbl.password}}</label>
> >         <td>{{=wdgt.password}}<td>
> >   </tr>
> >   <tr>
> >         <label for="password2"{{=T('Verify Password')}}</label>
> >         <input class="password" name="password2">{{if
> > form.errors.password2:}}<div class="error">NO MATCH</div>{{pass}}</
> > input>
> >   </tr>
> >   <tr>
> >         <label for="register_first_name">{{=lbl.first_name}}</label>
> >         <td>{{=wdgt.first_name}}</td>
> >   </tr>
> >   <tr>
> >        <label for="register_last_name">{{=lbl.last_name}}</label>
> >        <td>{{=wdgt.last_name}}</td>
> >   </tr>
> >   <tr>
> >        <label for="register_email">{{=lbl.email}}</label>
> >        <td>{{=wdgt.email}}</td>
> >   </tr>
> >   <tr>
> >        <label for="register_phone1">{{=lbl.phone_no1}}</label>
> >        <td>{{=wdgt.phone_no1}}</td>
> >   </tr>
> > </table>
> > <input type="submit" id="bsubmit" name="bsubmit" value="Submit" />
> > </form>
> > </body>
> > </html>
>
> > {{=form}}
>
> > On 10 Lip, 09:36, mdipierro <[email protected]> wrote:
>
> > > Can you show the user.html?
>
> > > On 10 Lug, 02:18, elfuego1 <[email protected]> wrote:
>
> > > > One more thing.
> > > > At the bottom of my registration form there is {{=form}} code.
> > > > It seems that I need to redirect login link to completly different
> > > > page.
> > > > Can you show where do I need to make changes to have it working?
>
> > > > On 10 Lip, 08:50, elfuego1 <[email protected]> wrote:
>
> > > > > Hi everybody,
>
> > > > > I had customized my registration form, but when I go to login page my
> > > > > registration form shows up there too?!
> > > > > It looks like that:
> > > > > Fields like password, password verification and e-mail have valid
> > > > > description in label field.
> > > > > All the other fields are marked "None".
> > > > > Below my custom form there is login part requesting: E-mail address
> > > > > and Password.
>
> > > > > I had read that def user(): exposes two 
> > > > > linkshttp://..../[app]/default/user/loginhttp://..../[app]/default/user/register
> > > > > In user.html I had just added code for my registration form. I don't
> > > > > know what caused that kind of behaviour...
> > > > > Can you please help me separate those two, so they would appear on 2
> > > > > separate pages as they should?

Reply via email to