I know how to do this with a regular html table select widget with javascript, but the option list select elements are being set by appgini to use some fancier code:
Code: Select all
<script>jQuery(function() {
jQuery("#speed_distance_units")
.addClass('option_list')
.select2({
minimumResultsForSearch: 5,
sortResults: AppGini.sortSelect2ByRelevence
});
})</script>
Code: Select all
$j(function(){
$j('#speed_distance_units').val('Knots');
});
As I wrote this question, I discovered that the value of the drop down had changed, but the value displayed in the widget had not! When I click on the widget and it drops down, the selection set by javascript is highlighted. But when I click elsewhere to remove the focus, the drop down continues to display the top item:
Any help will be greatly appreciated!
BTW, I know there are other ways to manage user unit preferences, including saving them all in the same units and displaying their preference on the various user interfaces. However that seemed difficult in appgini and still have the units displayed in the table view what they prefer.