Re: QFC: Building Forms
| From: | Alexey Borzov | Date: | Fri, 24 Oct 2003 18:13:19 +0000 |
| Subject: | Re: QFC: Building Forms | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-8565@lists.php.net to get a copy of this message | ||
Hi!
Mike Carter wrote:
Let me repeat: forms *should* be built not only to be displayed, but to be processed after submit as well. These dull things, you know --- validation, filtering, storing the submitted values.Is there any way I know wether the element object being built is the one which is going to be displayed? Then if it is not I could just skip the calls to webservices which cause delays and additional over head. Maybe looking at the $page variable passed in?Why do all forms get compiled everytime you move to the next page? Surely there is a way to optimise this building process? Of maybe there is something I can do to reorganise my code? Would much appreciate any suggestions from experienced QFC users :)Forms are built because QF::exportValues() method needs element objects to work.
I don't see a problem here: why not use this postcode as a kind of key?If the results of this webservice call are not expected to change too often, you can implement some form of caching.Sadly they change depending on the input on the previous page - when a postcode is entered. This means I cannot really cache the values, although it might be an interesting idea to speed up accessing the remote Postcode webservice.