Re: Formbuilder fieldLabel postfix/prefix [feature request?]
| From: | Rodrigo Alvarez | Date: | Thu, 21 Apr 2005 21:06:41 +0000 |
| Subject: | Re: Formbuilder fieldLabel postfix/prefix [feature request?] | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-18895@lists.php.net to get a copy of this message | ||
Justin Patrin wrote:
On 4/21/05, Rodrigo Alvarez <papipo@gmail.com> wrote:Ahahah, ok. I think that's a good idea, isn't it? Thank uJustin Patrin wrote:;-) I was suggesting options for a new feature. This isn't implemented yet.On 4/20/05, Rodrigo Alvarez <papipo@gmail.com> wrote:I used this inside the DataObject beign used by FormBuilder: function dataObjectFieldFormatter($fieldString, $field, &$do) {Hi PEARs, I'm using this inside a DO: var $fb_linkDisplayFields = array('name', 'price', 'costcategory_id'); var $fb_linkDisplayLevel = 2; I want to append an Euro symbol to the 'price', so It can be easy identified in the select field being generated. Is this possible? I'm trying to do it by using this: function postGenerateForm(&$form, &$fb) { $costvariable_id = &$form->getElement('costvariable_id'); foreach ($costvariable_id->_options as $opt) {Perhaps a formatting callback? For the full DO string (as returned by DB_DataObject_FormBuilder::getDataObjectString($do)): dataObjectFormatter($doString, &$do) For a DO field: dataObjectFieldFormatter($fieldString, $field, &$do)// Do some kind of replacement here} } Any ideas?if ($field == 'price') { $do->price = $fieldString . ' €/hora'; }} But that method is not called anytime. How should I do it? Where should I implement that method?