following this way of customize the form. 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
> > login form.
> > 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 your form work 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 a form using the controller:
> > > > def login():
> > > >     store.person.email.requires=IS_NOT_EMPTY()
> > > >     form=SQLFORM(store.person,fields=['email','password'])
> > > >     if FORM.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 a css expert to take those tables and arrange them on
> > > > the page.
> > > > i'd like the login form horizontal 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 login form costumized.
> > > > 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