Quick Question for newbie

I am trying to figure out the Wiki on Collecting Tabular Input. See here: Collecting Tabular Input

In the section on the controller where he says

"if($valid) // all items are valid

        // ...do something here"

Based on his example, how would I call my save method there? $items->save(); or $item->save(); or something else?

Thanks in advance!

Erik




foreach($items as $item)

{

  $item->save();

}



:)

The answer oc ScallioXTX is coorect, anyway I’d like to point you that there is an extension for manage tabular input.

Take a look at this thread, this page of the guide, there is an extension and a wiki about it.

Thanks for the quick reply. I have tried the extension but was having issues with a many to many relationship.

I need to have a form where timesheet fields can be submitted for each client all on one screen (tabular input). However, I am not sure if working in the Timesheet controller create action is the right place to start… or is this not right?

Usually this tabular input are in relations one-many with some model.

In this case I put use the controller of the main model.