a, has, current, please=db.define_table, Field, request.vars, crud

the_thing=a('thing', has('name'), has('category'))

my_things = db(thing.id>0)

def index():
     the_thing.category.default = current.category
     form = please.create(the_thing)
     things = my_things.select()
     return dict(form = form, things = things)

On Jul 30, 7:47 am, Johann Spies <johann.sp...@gmail.com> wrote:
> On 26 July 2010 13:44, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > You can use
>
> > db.table.field.default=previous_form.vars.field
>
> > to propagate the values forward..
>
> Where do I do this?   I suppose the controller is the correct place,
> but do I do it in the same environment where I would use keepvalues?
> I don't want the values to be written directly to the database.   The
> "db.table.field.default" is confusing me a little bit.
>
> Also:  where can I read a little bit about "previous_form"?  I did not
> find anything in the book.  Maybe it is something for the new book.
>
> Regards
> Johann
>
> --
>     "Be not deceived; God is not mocked: for whatsoever a
>      man soweth, that shall he also reap."
>                                   Galatians 6:7

Reply via email to