APIs & Integrations

adriansprake
Teilnehmer/-in

Alphasorting dropdown lists by secondary value

Hi,

We have forms set up in several different languages and have translated the dropdown lists within these forms as well. Is is possible to alphasort the lists by translation value rather than the original language of the field? At the moment although the translated values are showing, they are not showing in alphabetical order.

many thanks!

Adrian

0 Upvotes
1 Antwort
Derek_Gervais
HubSpot-Alumnus/Alumna
HubSpot-Alumnus/Alumna

Alphasorting dropdown lists by secondary value

Hi @adriansprake,

The order of your dropdown options will reflect the order of the property’s options in the property settings. It’s not possible to alphabetize this automatically (or dynamically, in the case of localization) in the form/property settings. One possible way to do this would be to select and sort the options using JQuery. The following stackoverflow topic might be useful in implementing something like this:

Sorting options elements alphabetically using jQuery

javascript, jquery, html, sorting

0 Upvotes