Re: FormBuilder and QuickForm_Controller

From: Date: Tue, 08 Mar 2005 11:52:10 +0000
Subject: Re: FormBuilder and QuickForm_Controller
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-17921@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dear Markus, > $form =& $fb->getForm(); Many thanks, I was close, but not quite there. I had left out the "&" in $form =& $fb->getForm(), hence it clobbered the existing form. Since what I want to do is proving so tricky, I'm beginning to think I am approaching the problem poorly. I want to do something which I imagine is quite common. If a select box in the FormBuilder form doesn't contain an option I want then I would like the ability to add another option and continue entering the record being edited. For example the following heirachy illustrates what I would like to do Person : links to Institution Institution : links to Country Country : links to Continent Continent When editing "Person" and the select box does not have the appropriate "Institution" entry, I would go to an intermediate form and add the institution. If the institution form does not have the approprate country selection I then go to the intermediate country form. And so on... I can see that it can be done in the preProcessForm() stage, by checking the relevent fields and optionally redirecting to another page which would allow one to add the new record. However using the QFC seemed cleaner as it looked like it could act as a wrapper for the forms and control the flow between them. I've now hit my head against the wall, mixing QFC and FormBuilder seems to be too hard. The fact that few people seem to be doing it indicates to me that there is a better way to do this. Do you have any suggestions? I'm about to evaluate the "redirect" option. > Of course I'm in no way related to this guy, no-no... (ahem). Of course. ;-) Thanks, - -ed -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFCLZHz+i4TdNhCMrYRAtq/AJ9i8TfeKK3LFylWqGfsUBdkbjeg1QCgzzfZ Fo7jgr101Eiq5taI+glWhJ4= =gXkV -----END PGP SIGNATURE-----

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