Re: Prepopulating forms via the URL

2008-12-15 Thread acoustic_overdrive
Hi, thanks both for your replies. @Alexandru: Unfortunately that's not flexible enough for me, because depending on where I'm coming from I may or may not want to pre- populate a field. @brian: I usually do it something like /project_images/add/project_id: 3 but that means I have to write logic

Re: Prepopulating forms via the URL

2008-12-15 Thread brian
On Mon, Dec 15, 2008 at 1:18 PM, acoustic_overdrive wrote: > > I just thought of a little function that I wanted to get some feedback > on. It's a way to pre-populate a form when adding new records, using > the URL only and no controller-specific controller logic. > > In AppController::beforeRend

Re: Prepopulating forms via the URL

2008-12-15 Thread Alexandru Ciobanu
acoustic_overdrive wrote: > I just thought of a little function that I wanted to get some feedback > on. It's a way to pre-populate a form when adding new records, using > the URL only and no controller-specific controller logic. > > In AppController::beforeRender : > > if(isset($_REQUEST['populat

Prepopulating forms via the URL

2008-12-15 Thread acoustic_overdrive
I just thought of a little function that I wanted to get some feedback on. It's a way to pre-populate a form when adding new records, using the URL only and no controller-specific controller logic. In AppController::beforeRender : if(isset($_REQUEST['populate'])) { if(empty($this->data))