GHEROLD Florent
|
Posted: 06/27/2002, 8:50 AM |
|
The exemple in tip and article does not work : i put the value in a variable
and try to call it in the list of value field ($LIST_VALUES) and i put
$LIST_VALUES=0;value1;1;value2;2;value3 in Module/Commun field property.
BUT IT DOES NOT WORK .....;;;;need a help
i try this :
ListBox - shared list of values
I find that there are a lot of situations where I want a ListBox/Label
to set/display a value from, say, under half a dozen fixed options. Using a
joined database table is overkill but the list of values is
tedious/dangerous because I end up having several in different pages.
The trick is:
1. In "Modules/Common", define the global variable:
$LIST_VALUES="0;Undefined;1;Male;2;Female";
2. In the relevant pages' Form "Events/Open", add:
global $LIST_VALUES;
(this allows the Form show function below to access the global
variable)
3. In the pages' Form "Field Properties/Join/List of Values" add:
$LIST_VALUES
(this is handled as a double-quoted string by CC, so variable
substitution works without any further custom code)
You can now just edit $LIST_VALUES in Modules/Common and all pages
will be correct. The added benefit is that this is now a dynamic array which
can be switched as required, e.g. to provide different languages.
Neil.
NEIL I'M SORRY BUT YOU PROBABLY MISSED SOME THING
if it work send me a answer
|
|
|
|