We have a blueprint wizard that selects appropriate templates and fills in a bunch of values depending on what the user selects. We have one page that's got an autocomplete-multiuser field.
We now have the need, in some cases, to pre-fill this and select a user or two as a suggestion for the user. I can't for the life of me work out how to do this.
As the field is a Select2 under the hood - I thought it would be as simple as:
$('#user-field').val("name.lastname@company.com");
$('#user-field').trigger("change"); However, it is not. Any help would be much appreciated!