I'm a little lazy here, and think you can grab what you need by
looking at https://www.tenthrow.com/register/

(it's a site that i work on, so i'm ok with telling you to look at the
javascript there).  The page is created with a custom form (you can
inspect the HTML to see the custom classes etc), and the javascript
validates that it's a new email address, the password length is met,
and that the passwords match all before submit.

good luck!  and feel free to ask if you still have questions

christian

On Aug 25, 9:04 am, Francisco Costa <[email protected]> wrote:
> Hello,
> I would like to know if you can have ajax validators when using custom
> forms.
>
> I leave here an example of a view to change password:
>
>     {{form=auth.change_password(next=URL(r=request, c='default',
> f='login'))}}
>
>     <h1>{{=T('Change Password')}}</h1>
>     {{=form.custom.begin}}
>         <table>
>             <tr>
>                 <td>{{=T('Old Password:')}}</td> <td><input
> type="password" value="" name="old_password"
> id="no_table_old_password" class="password"></td>
>             </tr>
>             <tr>
>                 <td>{{=T('New Password:')}}</td> <td><input
> type="password" value="" name="new_password"
> id="no_table_new_password" class="password"></td>
>             </tr>
>             <tr>
>                 <td>{{=T('Verify Password:')}}</td> <td><input
> type="password" value="" name="new_password2"
> id="no_table_new_password2" class="password"></td>
>             </tr>
>                 <td></td> <td>{{=form.custom.submit}}</td>
>             </tr>
>         </table>
>     {{=form.custom.end}}
>
> In this case what i wanted is something that validates the old
> password and that the new and verief password are the same.
>
> Thank you

Reply via email to