Skip Navigation

[Resolved] Order of translated items in a drop down select field

This support ticket is created 2 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by simonM-5 2 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#2447969
Screenshot 2022-08-31 at 14.17.44.png
Screenshot 2022-08-31 at 14.17.30.png

Hi Support

We have a custom field COUNTRY which has a list of 36 countries as options for a drop down field.

The cred_field is displayed on the form "Post Form - New Native Nanny User"

When viewing the drop down in English, the Countries appear in the desired order, with Germany as 1 and the rest sorted alphabetically.

When viewing in German, however, the list is no longer ordered alphabetically, rather the order follows the alphabetisation of the English names (see screenshots).

I can get Germany to always display first by using the default option, so that's not a problem. Is there a way to have the German list sort alphabetically in German too? Something like " order by Display Text ".

I can see in the options for https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_field , that there are "ordering" and "order" as options, but there are no examples of how to use it. Also there is big warning that this code may be old and should likely be avoided.

Kind regards
Simon

#2448049

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Simon,

Thank you for getting in touch.

Actually they are ordered in the way the field was created. Even when you switch the language that same order will remain in which the field was created.

The only way I can see the order changing is if you use some form of custom javascript to change the order on the frontend, however this javascript will run on both the English and German version of your site.

Thanks,
Shane

#2450871
Screenshot 2022-09-05 at 10.01.28.png
Screenshot 2022-09-05 at 10.00.02.png

HI Shane

OK, that's a shame that we cannot influence the sorting in German. It's only a few countries that begin with a different letter in German, so I guess we can live with it.

On a side note, the drop down fields are appearing strangely throughout our site (see screenshot) with the arrow appearing way too high the field and the field size is different from all other fields - any ideas what has influenced that negatively? Previously they all looked good with the same size and the drop down arrow was centred right in the field as it should be.

Kind regards
Simon

#2451083

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Simon,

This appears to be some form of css issue. Was there a new plugin installed recently or a theme update?

Perhaps something on your website changed from the moment it was displaying normally.

Thanks,
Shane

#2451127

Hi Shane

I narrowed it down to WooCommerce plugin, as soon as it's activated the incorrect displaying of the fields occurs. So I guess I'll follow up with WC Support/Asta theme support.

Thanks and best regards
Simon

My issue is resolved now. Thank you!