I am using the AutoComboboxSelectMultipleWidget and I have setup Ajax calls to add a new element to the list the widget uses. When the add is complete I would like to select the new item. How does one do that?
I have successfully set the value of the input box to the new value using...
$("#id_of_field").val(new_value);
However, it will not add it to the selected deck. Here are a few things I have tried...
$('#id_of_field').trigger("autocompleteselect"); // trigger the select with jQuery
$('#id_of_field').djselectable("select"); // use the djselectable select event
$($('#id_of_field').data('autocomplete').menu.active).find('a').trigger('click'); // trigger click in the ui-list
None of these have worked, and an entire morning of searching has not turned up an answer. Any help will be greatly appreciated.