Re: FormBuilder linkNewValue issue

From: Date: Fri, 20 May 2005 17:13:36 +0000
Subject: Re: FormBuilder linkNewValue issue
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19314@lists.php.net to get a copy of this message
On 5/20/05, Ken Restivo <ken@restivo.org> wrote: > On Fri, May 20, 2005 at 07:52:10AM +0200, Alessandro Pasotti wrote: > > * Imagine you are adding a new record in the same scenario described above, > > * When you call validation method _before_ the subform is processed it fails > > because the required FK for the linked table is null. > > * To make it work, I had to modify fb->processForm to posticipate validation > > of the main form _after_ the subform is processed. > > > > I ended up having to implement my own FB-like functionality (mostly API-compatible with FB, in > case I want to switch later), and this is exactly how I had to do it. Now why would you go and do that....what's wrong with FB as it is? > > My custom validate() and process() methods loop through all the subforms first, and deal with > them before the main form is looked at. > -- Justin Patrin

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