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 the password? > > 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',requires=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.