Design And Logic Question

I have to create a data/entry form for and old database system where the Table contains both the Header information and Detail information. Stupid example below.

FirstName LastName Address Item Number of Items

Jane Doe 1 street shirt 5

Jane Doe 1 street Pants 2

Jane Doe 1 street socks 3

Tom Riley 5th ave shirt 10

Tom Riley 5th ave pants 1

Tom Riley 5th ave socks 1

What I would like to do is Enter just once the Firstname, Lastname, and Address and then be able to enter multiple Item, and Number of Items. On submit I could just use what was stored for firstname, lastname, and address and add it to each record of item and number of items.

But I’m not sure how to go about it. I’ve looked at collect tabular input, zinputtabluar (doesn’t work because of php 5.3), jquery where I have a + (plus sign) to add Item and Number of items.

The jquery stuff works with CFormModel but not CActiveForm but i need CActiveForm because of database.

I’m so confused and don’t know where to start. Any help would be greatly appreciated.

I think I might have found solution. The extension jqrelcopy. I got the example from Jqrelcopy.

I was able to get the sample working. I can create multiple records and delete records but don’t know how to figure out the upate.php view file.

I also need to figure out how to incorporate how to enter just one header record on the form above the detail records. then when saving add that header record to the detail records.