Re: HTML_QuickForm2: Where to put additional constructor elements?
| From: | Alexey Borzov | Date: | Fri, 21 Jan 2011 21:34:50 +0000 |
| Subject: | Re: HTML_QuickForm2: Where to put additional constructor elements? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-54012@lists.php.net to get a copy of this message | ||
Hi Christian,
On 21.01.2011 15:16, Christian Weiske wrote:
I am implementing my own QF2 element (backgroundtext if someone remembers) and want to pass an additional setting/argument to the element constructor. What is the best way to do that? Things to consider: 1. It would work with $container->addElement(), which means I only haveYes, your are right, that's the intended way. It should probably be a lot easier to implement "backgroundtext" now, with JS support in QF2 0.5$attributes and $data parameters2. $attributes is IMO only for tag attributes 3. $data is for "additional data". I *think* adding a new array key to $data as the setting is the correct way. What do you say?