I don't think this can be done with crud, but I'm always ready and
expecting to be amazed by some hidden web2py secret. In theory, I
don't see why one shouldn't be able to give crud a list of records to
be updated and then have crud build the form with multiple record
entries. This could be mighty useful IMHO. However, my understanding
is that crud is for updating 1 table, 1 record at a time. Custom forms
and such are the way to go for more complex behaviors.

On Sep 11, 3:55 am, Serbitar <rserbi...@googlemail.com> wrote:
> Sure, I know that. But I am explicitly looking for the convenience of
> crud that also automatically generates the forms for that.
>
> I basically want to auto-generate forms that allow updating of
> multiple values. I know how to do it with custom forms, but that is
> quite tedious. A crud solution would be much better.
>
> On Sep 10, 11:12 pm, Richard Vézina <ml.richard.vez...@gmail.com>
> wrote:
>
>
>
>
>
>
>
> > for fieldvalue in list of values:
> >     db.person.insert(name=fieldvalue)
>
> > Off coarse you can do it for multiple values :
>
> > list1=[(valfield1,valfield2,valfield3),(etc.),(etc.)] # Note : first
> > tuples = first rows you want to insert
>
> > for field1, field2, field3 in list1
> >     db.person.insert(field1=field1, field2=field2, field3=field3)
> >     db.commit # or you wait and the end of the loop better only one commit
>
> > Richard
>
> > On Sat, Sep 10, 2011 at 4:12 PM, Serbitar <rserbi...@googlemail.com> wrote:
>
> > > To be more specific:
>
> > > Multiple records (found via a query), all with different values of
> > > course and one text field for each record. Just one submit button.
>
> > > On Sep 10, 9:55 pm, Serbitar <rserbi...@googlemail.com> wrote:
> > > > is there any way toupdatemultiplerecordswith crud.update, or 
> > > > evenrecordswith a given query?

Reply via email to