thanks that works great!

it would be nice to have the form.element documented!


On Mar 5, 3:15 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
> after accept try
>
> form.element(_name='password')['_value']=''
>
> On Mar 4, 10:46 am,vince<lapcc...@gmail.com> wrote:
>
> > oh it was typo.
>
> > db.define_table('person',
> >             db.Field('name'),
> >             db.Field('password','password'),
> >             .....
> > )
> > db.person.password.requires = [IS_NOT_EMPTY(), CRYPT()]
> > thisrecord=db(db.person.id==1).select()[0]
> > form=SQLFORM(db.person, thisrecord)
> > if not form.accepts(request.vars,session):
> >    form.vars.password=""
> >    db.person.password.update=""
>
> > i actually want the form password <INPUT> to be empty. so the user
> > have to input the password again every time the table updated. it's
> > because of the CRYPT(), password select from thisrecord is always a
> > wrong one.
>
> > but this one doesn't work. is there any way to do it?
>
> > -vince
>
> > On Mar 3, 10:26 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > should be
>
> > > thisrecord=db(db.person.id==1).select()[0]
> > > form=SQLFORM(db.person, thisrecord) # <<<<
> > > form.vars.name="test"
> > > db.person.name.update="test"
> > > form.accepts(request.vars,session) # <<<<
>
> > > On Mar 3, 4:28 am,vince<lapcc...@gmail.com> wrote:
>
> > > > i want to do an update with a specific default input value like this
>
> > > > thisrecord=db(db.person.id==1).select()[0]
> > > > form=SQLFORM(thisrecord)
> > > > form.vars.name="test"
> > > > db.person.name.update="test"
>
> > > > both form.vars or field.update doesn't work as you've mention they are
> > > > visualized field
> > > > is there any way to do this?
>
> > > > -vince
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to