Dwayne, thanks for the detailed reply :)
I'll try it later today when I have time and update here.

Thank u guys!

On Feb 15, 9:36 pm, Dwayne Hanekamp <[email protected]> wrote:
> Hello Yaron,
>
> For this u need to use the jquery plugin for dynamic forms 
> (http://www.quackfuzed.com/demos/jQuery/dynamicField/).
> The Librarian can click on a button and the new fields will appear.
> For each field use a default name with [] at the end (which will make
> it stack like a array) example: data[][book_id] after the fields have
> been submitted, u will save them via a foreach-luss. something like:
>
> foreach($data as $data){
> $this->Book->create();
> $this->Book->save($data);
>
> }
>
> Thats pretty much it! At least if i understand your question right!
>
> On 15 feb, 18:56, Yaron <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi,
> > Suppose I have a book-borrowing application with a Customers table, a
> > Books table and Borrowings table (customer_id, book_id and date
> > fields).
> > The borrowing view has three fields: customer, date and book (this
> > field is a drop-down-box). Usually, a customer borrows more than a
> > single book at once. The librarian does want to add one book at a
> > time, but enter as many books as needed on the same view: when he
> > picks a book, a new book field appears. Another book pick adds another
> > book field, etc. When the librarian hits "Save" every book gets a
> > record, when the "customer" and "date" fields serve all book records.
> > Help needed please, since I have no idea how to do that. Thanks!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to