This is the form I am using in my layout file -- thus no controller
involved. I am using the {{=auth.login()}} form which comes with the
framework. I define the form in the first line of the snippet I posted in
my original post. Is that not the right way to go?
On Tuesday, August 14, 2012 11:50:22 PM UTC-7, lyn2py wrote:
>
> Maybe you can show us the controller code?
>
> The controller needs to have code that looks something like:
> form=SQLFORM(db.table)
> if form.process().accepted:
> response.flash = 'form accepted'
> elif form.errors:
> response.flash = 'form has errors'
> return dict(form=form)
>
>
> On Wednesday, August 15, 2012 1:51:12 PM UTC+8, shartha wrote:
>>
>> Hello,
>> Quick question:
>> Instead of {{=auth.login()}}, I am using the following to be able to
>> customize my login form. However the resulting form does not work and I
>> cannot login with the same username/password that enable me to login if I
>> had used {{=auth.login()}} -- I get the flash error: Invalid Login.
>>
>> Could someone please tell me what's possibly going wrong? Thanks!
>>
>> {{form=auth.login()}}
>> {{=form.custom.begin}}
>> Username:
>> {{=form.custom.widget.username}}
>> </br>
>> Password:
>> {{=form.custom.widget.password}}
>> {{=form.custom.submit}}
>> {{=form.custom.end}}
>>
>
--