On 7/27/07, bingomanatee <[EMAIL PROTECTED]> wrote: > > I want to add "duplicate" to the scaffolding of my site; while I can > of course envision a wholly seperate action for duplicate, I have to > think that someone with more familiarity with Cake could help me > "Tweak" the existing views to repurpose them for inserting a duplicate > record with the same values as an existing record (except ID of > course). > > Any suggestions?
Sounds to me like a possible solution is this: 1) add a checkbox to your form labeled 'duplicate' 2) in your save action check to see if 'duplicate' has been selected. If it is then simply save the record again. You'd have to make sure that whatever validation rules you have in place would allow for a duplicate record to be put in (i.e. make sure you have no unique fields in your databaase). Hope that helps. BTW, generating duplicate records doesn't sound like a "useful paradigm" to me, sounds more like an edge case. Duplication of records without a really good reason lies on the path to application maintenance hell. -- Chris Hartjes Senior Developer Cake Development Corporation My motto for 2007: "Just build it, damnit!" @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---