I think I just realized the field is missing one important tag:
<input type="password" />
That should solve my problem ;-)



On 7 Lip, 13:49, mdipierro <mdipie...@cs.depaul.edu> wrote:
> If you have a custom form, you should perform two steps:
>
> 1) manually insert the passoword 2 in the form
>
> <tr>
>        <th><label for="password" id="password">{{=lbl.password}}</
> label></th>
>        <td>{{=wdgt.password}}<td>
> </tr>
> <tr>
>        ...<td><input name="password2" />{{if form.errors.password2:}}
> <div class="error">NO MATCH</div>{{pass}}</td>
> </tr>
>
> 2) serverside you just do
>
> form.append(INPUT(_name='password2',requires=IS_EXPR('value=%s' %
> repr(request.vars.password)))
>
> On 6 Lug, 18:30, elfuego1 <elfue...@gmail.com> wrote:
>
>
>
> > Password field in my form looks like this:
>
> > <tr>
> >        <th><label for="password" id="password">{{=lbl.password}}</
> > label></th>
> >        <td>{{=wdgt.password}}<td>
> > </tr>
>
> > Next how should I invoke:
> > form.element(_name='password').parent().append(INPUT(_name='password2',requ­ires=IS_EXPR('value=
> > %s' % repr(request.vars.password)) ))
>
> > to recive next input field for password verification?
> > How should I define TD=??? to have it working?
>
> > On 6 Lip, 20:28, mdmcginn <michael.d.mcgin...@gmail.com> wrote:
>
> > >  Seehttp://web2py.com/book/default/section/5/2fordocumentationon
> > > HTML Helpers. I believe Massimo's solution assumes there are tables in
> > > your form, which is the default for FORM and SQLFORM. If your form
> > > doesn't contain HTML elements such as <table><tr><td>, maybe you're
> > > using <div> or <span> instead. Look at your HTML - hopefully there is
> > > some semantic/DOM code in there that you could hook into. If you're
> > > depending on <br> to format your form instead, Massimo's solution
> > > probably won't help you much (and neither will CSS or AJAX).
>
> > > On Jul 6, 1:27 am, elfuego1 <elfue...@gmail.com> wrote:
>
> > > > No, I don't.
> > > > So does TD supposed to work as a variable or list?
> > > > And what if I'd like to use form.element again? Do I append another
> > > > form.element to TD and us it as a list?
> > > > How do I address the value that is assigned to TD: TD[0], TD[1] and
> > > > why is it "TD" in the first place?
> > > > Is out there some description or example of this syntax?
>
> > > > Best regards.
>
> > > > On 6 Lip, 07:35, KR <kaerbu...@gmail.com> wrote:
>
> > > > > Do you have somewhere in your code TD=something ?
>
> > > > > On 6 juil, 01:18, elfuego1 <elfue...@gmail.com> wrote:
>
> > > > > > Can you please tell me yet how to implement it, so it would start
> > > > > > working in my form and verify thepassword?
> > > > > > When I add it to view: user.html or controller default.py then I
> > > > > > receive:
> > > > > > TypeError: 'TD' object is not callable
>
> > > > > > So please let me know how to use form.element syntax to make it work
> > > > > > properly.
>
> > > > > > On 4 Lip, 17:08, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > > > > > form.element(_name=='password').insert(INPUT(_name='password2',requires=IS_
> > > > > > >  ­EXPR('value=
> > > > > > > %s' % repr(request.vars.password)) ))
> > > > > > > should have been
> > > > > > > form.element(_name='password').parent().append(INPUT(_name='password2',requ
> > > > > > >  ­ires=IS_EXPR('value=
> > > > > > > %s' % repr(request.vars.password)) ))
>
> > > > > > > form.element(_name='password') finds the INPUT(name="password") 
> > > > > > > item
>
> > > > > > > form.element(_name='password').parent() finds the parent of such
> > > > > > > element, the TD()
>
> > > > > > > form.element(_name='password').parent().append(...) appends 
> > > > > > > something
> > > > > > > to the TD()
>
> > > > > > > INPUT(_name='password2',....) is the appened <input 
> > > > > > > name="password2">
> > > > > > > field
>
> > > > > > > This:
> > > > > > >    requires=IS_EXPR('value=%s' % repr(request.vars.password))
> > > > > > > sets the requirements. i.e. the value ofpasswordis the same as the
> > > > > > > value of fields request.vars,password
>
> > > > > > > On 4 Lug, 09:37, elfuego1 <elfue...@gmail.com> wrote:
>
> > > > > > > > I'm trying to make a use of this piece of code but nothing 
> > > > > > > > works. Can
> > > > > > > > you please tell me where can I find some fine documentation 
> > > > > > > > that shows
> > > > > > > > exactly how to use it or maybe write me an example because I 
> > > > > > > > have no
> > > > > > > > idea where to put it in my form to make it work.
> > > > > > > > HELP PLEASE!!
>
> > > > > > > > form.element(_name=='password').insert(INPUT(_name='password2',requires=IS_
> > > > > > > >  ­EXPR('value=
> > > > > > > > %s' % repr(request.vars.password)) ))
>
> > > > > > > > or another example
>
> > > > > > > > How do I use this piece of code to customize form field 
> > > > > > > > length???
> > > > > > > > form.element(_name='last_name')['_size']=20
>
> > > > > > > > Can anyone show me how to do that because there is no example in
> > > > > > > > documentation, no properly written piece of code to meke use of.
>
> > > > > > > > On 2 Lip, 12:25, elfuego1 <elfue...@gmail.com> wrote:
>
> > > > > > > > > Thank you for your speedy help!!!
>
> > > > > > > > > On 2 Lip, 12:13, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > > > > > > > > you can do for example (assuming trunk)
>
> > > > > > > > > > form.element(_name=='password').insert(INPUT(_name='password2',requires=IS_
> > > > > > > > > >  ­­EQUAL_TO(request.vars.password)))
>
> > > > > > > > > > if you do not use trunk instead of 
> > > > > > > > > > IS_EQUAL_TO(request.vars.password)
> > > > > > > > > > you can use
>
> > > > > > > > > > IS_EXPR('value=%s' % repr(request.vars.password))
>
> > > > > > > > > > On 2 Lug, 04:58, elfuego1 <elfue...@gmail.com> wrote:
>
> > > > > > > > > > > Since I am customizing my registration form, can you tell 
> > > > > > > > > > > me what to
> > > > > > > > > > > do to havepasswordverificationfunctionality? I don’t know 
> > > > > > > > > > > how to
> > > > > > > > > > > implement it in my form. I havepasswordinput field in the 
> > > > > > > > > > > form and
> > > > > > > > > > > corresponding field in my database. Do I have to add 
> > > > > > > > > > > additional field
> > > > > > > > > > > for password2 and somehow compare those two fields or is 
> > > > > > > > > > > there some
> > > > > > > > > > > functionality in web2py which I could use out of the box?
>
> > > > > > > > > > > Best regards.

Reply via email to