DB_DataObject_FormBuilder get ID on insert?

From: Date: Mon, 20 Jun 2005 06:19:13 +0000
Subject: DB_DataObject_FormBuilder get ID on insert?
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19687@lists.php.net to get a copy of this message
Hi, I have a 'contact' object with name, phone, address, etc. I'm trying to accomplish something along the lines of: Page 1: Search box (no problem) Page 2: Display existing 'contact' objects matching search, and show a form for new contact object (no problem) - If user clicks on existing 'contact' then pass it's primary key to Page 3 (no problem) - If user creates a new 'contact' object through the form, validate it and pass the newly created primary key to Page 3 ( here's the problem ) The form submits fine and creates the object, but I have no idea how to get the newly created primary key. I've tried checking $form->getSubmitValues and $form->getElementValue('contact_id') but none of them seem to return the newly created ID. Is there something simple I'm missing here? How can I accomplish what I'm looking for? Any help would be greatly appreciated. Thanks in advance, Dan Chmielewski

« previous php.pear.general (#19687) next »