Skip to main content

I have People Control added to my Nintex Form. I want all the users to be cleared/removed from the field.

The control settings are as below -

Whenever I open the form the users that were selected in the last instance are availabel. I want to remove these users from the control on the form using JavaScript.

I am able to retreive the value of these users using the below JavaScript.

var companyUsers = NWF$('#' + fldCompanyUsers).val();

alert(companyUsers);

However, I am just not able to clear the control of all the usesr.

Any help is appreciated.

Thanks.

see  


I have already checked that article. It talks about adding the users. I could not figure out, hoe to remove the users, from it.

I tried -

NWF$('#' + fldCompanyUsers).clear();

But, this does not do the required.


read through it carefully what's the proper usage. and there is an example how to remove an user as well.

to clear all the users following should work

var varPP = new NF.PeoplePickerApi('#' + fldCompanyUsers);
varPP.clear();

That did the Job.

I was trying to mix both the statements. But puttting them seperate as given by you, has done the trick.

Thanks, I appreciate your efforts.


converted discussion to question.


great!

if you have a working solution please select and mark correct answer.


Reply