I`ve just had the same problems and now I could fix the problem.
But I´ve just one more problem and I hope you can help me.
With your code {{=form.costum.begin}} etc.
my "Remember My Login"- Checkbox is missing now.

It`s defined in the db.py:

auth.messages.label_remember_me = " Remember Me"

Can you help me?



On 17 Mai, 13:36, "[email protected]" <[email protected]>
wrote:
> following this way of customize theform. i saw ppl asking about the
> submit button - the way with sqlform.factory works but not on every
> condition.
> another way more easy can be this one:
> submit: <div class="subsub">{{=form.custom.submit}}</div>css:
> .subsub input, textarea {
>
>         padding: 2px 5px;
>         background: #F9F8F1;
>         border: 1px solid #D2BA29;
>         font: bold 1em Georgia, "Times New Roman", Times, serif;
>         color: #2D2D2B;}
>
> u can even add image :>
>
> hf!
>
> On May 17, 7:20 am, "[email protected]" <[email protected]>
> wrote:
>
>
>
> > so i added web2py auth and used this widget tool whatever it is but
> > worked :)
> > <h2>{{=request.args(0)}}</h2>
> > {{=form.custom.begin}}
> > username: {{=form.custom.widget.email}}
> > password: {{=form.custom.widget.password}}
> > submit: {{=form.custom.submit}}
> > {{=form.custom.end}}
>
> > finally :)
> >  Thanks for the book!
>
> > On May 17, 6:22 am, "[email protected]" <[email protected]>
> > wrote:
>
> > > well you are right about "reinventing the wheel" but i did this
> > > because of the same problem - i thought this way i could costumize the
> > > loginform.
> > > Anyways i saved everything ive done and replaced with the web2py auth
> > > module.
> > > Now....can u please tell me how can i costumize it ?
> > > I need to incresse the size of them and align the horizontaly. Maybe
> > > its easy. Just give me a start up. or a little example.
> > > Thanks!
>
> > > On May 16, 11:08 pm, mdipierro <[email protected]> wrote:
>
> > > > Why are you reinventing the wheel? Why are you not using?
>
> > > > def login(): return dict(form=auth.login())
>
> > > > We can make yourformwork but it would still miss lots and lots of
> > > > stuff from auth.
>
> > > > On May 16, 8:20 pm, "[email protected]" <[email protected]>
> > > > wrote:
>
> > > > > i have made aformusing the controller:
> > > > > def login():
> > > > >     store.person.email.requires=IS_NOT_EMPTY()
> > > > >    form=SQLFORM(store.person,fields=['email','password'])
> > > > >     ifFORM.accepts(form,request.vars,session):
> > > > >        users=store(store.person.email==form.vars.email)\
> > > > >                (store.person.password==form.vars.password).select()
> > > > >        if len(users):
> > > > >           session.authorized=users[0].id
> > > > >           session.email=users[0].email
> > > > >           session.alias=users[0].alias
> > > > >           session.flash='user logged in'
> > > > >           redirect(URL(r=request,f='index'))
> > > > >        else:
> > > > >          form.errors['password']='invdalid password'
> > > > >     return dict(form=form)
>
> > > > > I could try to get from the scaffolding html that {{=form}} makes. the
> > > > > dicv:  #person_password and #person_email
> > > > > and style a bit the forms. but thats almost like. i have the most
> > > > > beautiful LCD in the world but renders just the half of the image.
> > > > > anyways i am not acssexpert to take those tables and arrange them on
> > > > > the page.
> > > > > i'd like the loginformhorizontal and with different sizez how can i
> > > > > do that ?
> > > > > i even tried replacing the :
> > > > >     store.person.email.requires=IS_NOT_EMPTY()
> > > > >    form=SQLFORM(store.person,fields=['email','password'])
>
> > > > > with :
>
> > > > >  form=FORM(TABLE(TR("User
> > > > > Name:",INPUT(_name="email",requires=IS_NOT_EMPTY())),
>
> > > > > TR("Password:",INPUT(_name="password",_type='password',
>
> > > > > requires=[IS_NOT_EMPTY(),CRYPT()])),
> > > > >                     TR("",INPUT(_type="submit",_value="login"))))
>
> > > > > But hell knows why is not working. i get invalid password (i have
> > > > > tried with long passwords - i tried all knid of password. even asked
> > > > > on irc on freenode nobody seems to know why this trick is not working)
>
> > > > > I also tried to follow the example from the slide. when i try to login
> > > > > nothing happens.
> > > > > tried about two methods that i found here in the group even nobody
> > > > > said they will work . still nothing. tried to follow examples from
> > > > > other apps but not a single app has a loginformcostumized.
> > > > > Please i lost a night
> > > > > PLease someone...light me!!!
>
> > > > > Its such a pity that so common and easy things have such hard ways.

Reply via email to