none
SPClientPeoplePicker error message RRS feed

  • Question

  • Hello,

    Is there any way to change error message text in SPClientPeoplePicker control ?

    Currently error message is like below image but can we change that ?


    anuj

    Tuesday, May 1, 2018 8:08 PM

All replies

  • Hi,

    Yes, you can:

    <%@PageLanguage="C#"%><%@RegisterTagprefix="wssawc"Namespace="Microsoft.SharePoint.WebControls"Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%><%@RegisterTagprefix="SharePoint"Namespace="Microsoft.SharePoint.WebControls"Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%><scriptrunat="server">
    
    
      protected void Button1_Click(object sender,EventArgs e)
    
      {
    
        bool IsValid = this.userPicker.IsValid;
    
        if(!IsValid)
    
        {
    
          this.userPicker.ErrorMessage = "NO user  is Matched";
    
        }
    
        
    
      }
    
    </script><!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title>Untitled Page</title></head><body><formid="form1"runat="server"><div><wssawc:PeopleEditorAllowEmpty=falseValidatorEnabled="true"id="userPicker"runat="server"ShowCreateButtonInActiveDirectoryAccountCreationMode=trueSelectionSet="User,SecGroup,SPGroup"IsValid=/></div><asp:ButtonID="Button1"runat="server"Text="Button"OnClick="Button1_Click"/></form></body></html>
    

    Best Regards,

    Dean Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Wednesday, May 2, 2018 7:47 AM
    Moderator
  • Hello Dean,

    Thanks for reply.

    Will that error message came in place of "No Result Found" as on my attached above image ?

    Because i am using SPClientPeoplePicker.SPClientPeoplePickerDict.peoplePickerDiv_TopSpan

    as custom people picker.


    anuj

    Wednesday, May 2, 2018 9:12 AM
  • Hi,

    Yes. You can try to execute the code above.

    Best Regards,

    Dean Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Wednesday, May 9, 2018 3:02 AM
    Moderator
  • Hi Anuj,

    I am checking to see how things are going there on this issue.

    Thanks,

    Wendy


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Monday, May 14, 2018 8:11 AM
    Moderator