Skip to main content

Hello all,

I am working on a form where a Person control is made available to the user conditionally based on the state of another control on the form (an internal vs. external user dropdown).

On most conditional fields, I've implemented onChange JS functions which clear the controls to prevent submission of data in fields which are no longer needed.  (If data is entered into a field and the condition is changed where that field is no longer needed, the data in the hidden field will be cleared and will not be submitted.)

Now I am presented with the challenge of clearing unresolved text from a people picker.  Any unresolved text in the picker, even if the control is hidden or disabled, seems to prevent the form from submitting.

I'm just wondering if anyone has achieved this before and how to go about doing so.

Thanks!

Have you tried to use the clear() method of the people picker javascript API (People Picker Extensions - Nintex Forms ) ?


Thanks for your response.  I am currently using the clear() method.  The issue I'm encountering with the clear method is that it only seems to clear the resolved entries in the people picker.

If I type some text and DON'T resolve the entry, and another control on the form (a checkbox for example) hides the people picker, the form will not submit and I get a message indicating there are unresolved fields on the form.

Any other suggestions?


You can try the following :

NWF$("#" + yourPeoplePickerControlID + " textarea").val('');

Hope it works


Just tried that and unfortunately I am still encountering issues.  The unresolved text remains in the picker control after the function should have fired.  The resolved entries are still being properly removed by the clear() function.

I appreciate any further assistance.  Thanks!


Sorry, I didn't test.

This should work :

NWF$("#" + yourPeoplePickerControlID).parent().find("textarea").val('');


That did it.  Thank you so much!


Great !

I'm glad that I could help !


I am using External Data column which has picker control. how to get on change event and retrieve selected value using java script.

This control is using as textpicker

var ExC = NWF$("#" + varExtDataCol).parent().find("textarea").val();
alert(ExC); --> I get lot of text which has displaytext='' and isResolved='true'

how can i get if isResolved='True' and displaytext values


Reply