Setting autocomplete-multiuser field using Javascript/JQuery

Elliot Sloman January 23, 2020

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!

1 answer

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 31, 2020

Hello Eliot,

If you're still encountering issues with this, have you raised a question at the Developer Community from our Developer Resources site? The folks there will be more equipped to help you!

Let me know if you have any trouble with that.

Regards,

Shannon  

Elliot Sloman January 31, 2020

Hi Shannon,

I hadn't considered that - I'll give that a go. Thank you!

Elliot

Like Shannon S likes this
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 3, 2020

You're welcome, Elliot. 

I hope you find the answer you are looking for!

Take care,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events