>
> I found a workaround to the problem. I need to assign the id "login" to 
> the form so that certain CSS and JS can be applied to the form elements. 
> Since I was unable to assign id to the form, I assigned the id "login" to 
> the table element. The login is now working.
>

Ah, I forget that form.custom.begin is an XML object (more like a string) 
and doesn't change when you directly manipulate the form object itself. You 
could do:

f.custom.begin = '%s id="login">' % f.custom.begin[:-1]

    if login_form.errors:
>         login_form.errors.email='Email/Password does not match'
>
>     return dict(login_form=login_form)
>
> In the view I have :
>
>                     <tr class="error">
>                         <td colspan="2"><!-- Show error here --></td>
>                     </tr>
>

Maybe something like:

    {{if login_form.errors.email:}}
    <tr class="error">
        <td colspan="2">{{=login_form.errors.email}}</td>
    </tr>
    {{pass}}

Anthony

Reply via email to