Re: FormBuilder linkNewValue issue
| From: | Ken Restivo | Date: | Fri, 20 May 2005 16:22:58 +0000 |
| Subject: | Re: FormBuilder linkNewValue issue | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19311@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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.
My custom validate() and process() methods loop through all the subforms first, and deal with them
before the main form is looked at.
- -ken
- --
- ---------------
The world's most affordable web hosting.
http://www.nearlyfreespeech.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCjg7ie8HF+6xeOIcRAo0gAKDtEO6aMS0Zk54vUrnXUCtJG4AclwCg4dKj
neUtyzSMBHksSmgDknrBuXg=
=Mcnt
-----END PGP SIGNATURE-----