Just published this tiny plugin called Air Static Dropdown labels, that i think some few people might find useful.
This plugin allows you to display dropdown labels different from the values when using the default bubble dropdown with the static option.
For dynamic choice you can simply use the features available in the default dropdown element.
If you want to have a dropdown with lables different from values, in most cases you create these as two different fields in your database and use the dynamic choice for the dropdown.
But there are cases that some developers want to use static choices for whatever reason.
Especially if you know your list is never going to change and therefore want to save your application from making a server side call to pull the list from the database.
This is where this plugin comes in handy.
Here is a demo link:
And the editor link:
- Install the plugin
- Add the element AirDropdownLabels to your page.
- Assign a unique id attribute to your original dropdown element
(If you haven’t already done so go to Settings page, General tab and check
Expose the option to add an Id Attribute ...)
- Enter this same id in the AirDropdwonLabels Element id field.
- Enter the list of texts you want the dropdown to display. Must correspond the the values in the dropdown and should be the same length.
If you checked “
This input should not be empty” on the dropdown, check the same property on the AirDropdownLabels (this is important or some cats will die, seriously ).
Note: As usual if you have multiple dropdowns make sure each of the id attribute values are different.