Re: Template_flexy + QuickForm problem: hidden formfieldgets overwritten with bad value
| From: | Alan Knowles | Date: | Wed, 13 Aug 2003 02:42:26 +0000 |
| Subject: | Re: Template_flexy + QuickForm problem: hidden formfieldgets overwritten with bad value | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-7171@lists.php.net to get a copy of this message | ||
it should be getElementPhp($this->getAttribute('ID'));
fixed in CVS
Regards
Alan
Andy Crain wrote:
Alan, I'm playing around trying to use the new form methods in Flexy, and I'm getting an undefined method error: Call to undefined function: aselement() in .../PEAR/HTML/Template/Flexy/Compiler/Standard/Tag.php on line 323 It happens when I attempt to put "FLEXY:DYNAMIC" in a template form field. I looked around and couldn't find a aselement() method anywhere, and I'm not familiar enough with Flexy to know what it should be, if "aselement" is indeed a typo. Any ideas? Thanks, Andy-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com-----Original Message----- From: Alan Knowles [mailto:alan@akbkhome.com] Sent: Tuesday, August 05, 2003 3:58 AM To: Andy Crain Cc: 'Bertrand Mansion'; pear-general@lists.php.net Subject: Re: [PEAR] Template_flexy + QuickForm problem: hidden formfieldgets overwritten with bad value Andy, It's best not to rely on the QF integration in Flexy, it has beendropedin the next release - due to quite a few reasons. There is a flexy renderer for quickforms, that Ron McClain wrote, the link is in the Mailing list archives (or it might be in CVS already?). This provides a slightly more classic way to integrate it.. - using {qf.formelement.xxxx:h} I think.. I have got some of the documentation for Flexy updated at http://devel.akbkhome.com/livedocs/livedoc.php?q=package.html.html- template-flexy It may be possible to use the $flexy->getElements() and the extra argument to $flexy->ouputObject() to do what The current version tried to do If someone wants to tackle that.... :) http://devel.akbkhome.com/livedocs/livedoc.php?q=package.html.html- template-flexy.html-template-flexy.getelements http://devel.akbkhome.com/livedocs/livedoc.php?q=package.html.html- template-flexy.html-template-flexy.outputobject Regards Alan Crain wrote:hopingThanks! I'll check that out. Andy-----Original Message----- From: Bertrand Mansion [mailto:bmansion@mamasam.com] Sent: Sunday, August 03, 2003 6:18 PM To: Andy Crain; pear-general@lists.php.net Subject: Re: [PEAR] Template_flexy + QuickForm problem: hidden formfieldgets overwritten with bad value <crain@fuse.net> wrote :somethingBertrand, Thanks very much for the tip. If nothing else works, I'll dolike that, probably just change the variable name. I was justoveraroundthat I could more directly address the problem, rather than codeEvenit. If that's not possible, though, it's not the end of the world. Could someone point me to the method or methods responsible for rewriting current request variables into form field default values?goingif I can't change the behavior, I'd like to know what is actuallyon, as I expect to use QuickForm much more in the near future. I couldn't find anything in the documentation or in my first skimforthewhenQF code.This is handled by events in element.php onQuickFormEvent() method,the updateValue event is passed. Some elements have special behaviors,example checkboxes or radios, and override onQuickFormEvent(). Basically, first we check for constants, then default values, then submitted values. If the element finds a submitted value, then it uses it. Asyourform uses GET method and the field has the same name, then it usesthisvalue. Bertrand Mansion Mamasam -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php