Re: [ANNOUNCEMENT] HTML_QuickForm-3.0RC1 (beta) Released.

From: Date: Mon, 02 Jun 2003 08:39:45 +0000
Subject: Re: [ANNOUNCEMENT] HTML_QuickForm-3.0RC1 (beta) Released.
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-5737@lists.php.net to get a copy of this message
Hi! First of all, knowledge of this stuff is not needed to *use* QuickForm. But if you wish to *extend* it by adding your own element type, read on. The stuff I write here will eventually be added to QuickForm manual. ThE PhP_KiD wrote:
How works a "onQuickFormEvent()" method on QuickForm ?
The onQuickFormEvent() method is defined in HTML_QuickForm_element class. It is called by various methods of HTML_QuickForm and HTML_QuickForm_group classes. The events are sent to change the state of elements: initialize them, set their value. Currently available events: 'createElement', 'addElement', 'updateValue', 'setGroupValue'.
What is "updateValue" ?
It is the event sent when the element needs to find a new value for itself, usually when the element is added to form or when some value-changing method is called (setDefaults/setConstants). How the element finds this value depends on its type. The default behaviour is to search form's _constantValues, _submitValues and _defaultValues properties (in that order) until the value is found. The changes in RC1 dealt with the fact that some elements do *not* need to use any kind of submit values.
How this event are trigger ?
'updateValue' is sent by * addElement() --- to an element being added, * setDefaults(), setConstants() --- to all form's elements, * group's 'updateValue' handler --- to all group's elements.

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