I have a form which looks like this:
Delete
[Publisher One ] []
[Publisher Two ] []
[Publisher Three] []
Add[ ]
So basically, every Publisher appears on the page in its own field. I can modify any of the Publisher names, delete any of the Publishers, or add a new publisher, all on one form, simply by saveAll-ing the form. I know that this will not hold up under 10,000 rows, but I am using CakePHP to remake an existing tool, and I am sure there will be a manageable number of rows.
The problem is that on first load, I have to pre-populate the fields. Now, from the CakePHP book, I am supposed to create the form with Model.n.field. However, the data I pull using a $this->Model->find('all') is in $data[n][Model][field] form. Am I going to have to mangle the data myself to get it in $data[Model][n][field] form, or is there an easy way to do that from within the find command, or perhaps a helper function to turn it from one into the other?