Re: FormBuilder help

From: Date: Thu, 25 May 2006 06:51:08 +0000
Subject: Re: FormBuilder help
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24149@lists.php.net to get a copy of this message
On 5/24/06, Patrick Paul <ppaul_apache@yahoo.ca> wrote:
First of all thank you for you quick response. I just subsribed to the mailing list a few hours ago and I'm receiving any mails and I don't know why. Anyways, regarding the problem at hand, I did what you told me and it works to create a new city in the cities table. However, the id used for the description is not set right and I'm not sure I understand what you meant by "Make sure to set the city ID in the description DO before you process it, though." What I want is the citites_id that has just been created for the cities table.
Yes, as I said: $description->cities_id = $city->cities_id; Oh, and don't do this:
$description->keys('id'); Give your description table its own auto_inc PK.
Thanks again, Patrick Justin Patrin wrote: But then you negate all of that here. You're using a description-only form from my last comment to here. That's not what you want. Instead of using $form, use $combinedForm. Then, to process, call $form->process with *both* of the formBuilder instances. First the city one, then the description one. Make sure to set the city ID in the description DO before you process it, though.
*?>* Any help would be welcome. Thank you, Patrick -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- Justin Patrin

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