Hi,

I've made a customised login form that gets displayed in the sidebar like 
so:
def mini_login(form):
    for lbl in form.elements("label"):
        lbl["_style"] = "display:none"
    form.element(_name="email")["_placeholder"] = "Email Address"
    form.element(_name="email")["_class"] = "btn-block"
    form.element(_name="password")["_placeholder"] = "Password"
    form.element(_name="password")["_class"] = "btn-block"
    form.element(_name="remember")["_style"] = "display:none"
    form.element(_type="submit")["_class"] = "btn btn-primary btn-block"
    return form


def side_user(auth):
    output = []
    # Check if the user is logged in
    if not auth.user and not request.function=='user':
        # Print a login form
        output.append(H4("Login"))
        output.append(DIV( mini_login(auth.login(next=URL(r=request, args=
request.args))), _id="sidebar-login" ))

But if a nonexistant user tries to log in nothing happens, the page just 
refreshes with no change. Instead I would like it to return an error 
message saying "username not found" error. I think this is probably usually 
done by the 'flash' stuff in the top-right corner but I'd like it to appear 
on the form itself. Is this possible?

Thanks!

-- 



Reply via email to