Re: formBuilder : how to override fb_linkDisplayFields
| From: | arnaud sellenet bodin | Date: | Tue, 18 Oct 2005 12:21:32 +0000 |
| Subject: | Re: formBuilder : how to override fb_linkDisplayFields | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-21524@lists.php.net to get a copy of this message | ||
Well I found a solution but I'm afraid it will cause som side effects:
I wrote a contructor for my class DataObjects_Categories :
function DataObjects_Categories(){
$this->fb_linkDisplayFields=array("name".LANG);
}
Hopefully some of you won't have a heart attack... Just let me know if you think what I did is BAAADD
Le 18 oct. 05, à 14:10, arnaud sellenet bodin a écrit :
Hello I have an article table linked to a categories table. This categories table has two name fields (one for french, one for english). Depending on the current language used (constant LANG) I would like to display the right options in the generated SELECT element. So I tried this (in Categories.php) : function preGenerateForm (&$fb){ $this->fb_linkDisplayFields=array("name".LANG); } But this has no effect the options are only populated with the PKs of categories, while doing this : var $fb_linkDisplayFields=array("name".LANG); makes a parse error. Do you have any clue ? -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php \ | /Arnaud Sellenet-Bodin Dév et dés http://demental.info Tel : 05 63 55 24 46 / | \