Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Public Forum / Main Forum / Drop Down Field: sort elements alphabetically

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

× OLD Forum post could be checked here : forum.joomprod.com

Drop Down Field: sort elements alphabetically

More
11 years 1 month ago - 11 years 1 month ago #4154 by immonnezza
I created a Drop Down field; i added different elements sorting them based on language, example:

(Name-Value)
Bianco-1
Nero-2
Rosso-3
Verde-4

When i change language, according to translation file (Bianco=White, Nero=Black, Rosso=Red, Verde=Green),
my Drop Down is:
White
Black
Red
Green

but i would like to be ordered alphabetically:
Black
Green
Red
White

Is there a configuration option to accomplish this?
(or do I have to modify source file...?)

Thanks
Last edit: 11 years 1 month ago by immonnezza.
The following user(s) said Thank You: adarr
More
11 years 1 month ago #4163 by tompap
You need some hack to do this (This is some help, I am not sure at 100% it's working)

in helpers/field.php

below

function JHTMLAdsmanagerField($conf,$field_values,$mode,$plugins) {
$this->conf = $conf;
$this->field_values = $field_values;

add
$fieldid = XXXX; //XXX the id of the field
foreach($this->field_values[$fieldid] as $key => $value) {
$this->field_values[$fieldid][$key] = TText::_($value);
}
asort($this->field_values[$fieldid]);
The following user(s) said Thank You: adarr
Moderators: perry
Time to create page: 0.113 seconds
Powered by Kunena Forum