The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Setting autocomplete-multiuser field using Javascript/JQuery

Elliot Sloman
Contributor
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
SMS
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
Contributor
January 31, 2020

Hi Shannon,

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

Elliot

Like SMS likes this
SMS
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

TAGS
AUG Leaders

Atlassian Community Events