Hi All,
I am facing an issue with SharePoint 2013 Client People Picker enter key press. I need that enter keypress event should invoke another button click instead of resolving the user names. But unfortunately I am not able to get that event and it seems like some other code is handling from somewhere in clientforms.js or clientpeoplepicker.js or autofill.js script files. I am not able to figure it out..
I am using,
<SharePoint:ClientPeoplePicker runat="server" ID="ADPicker" Required="false" ValidationEnabled="false" InitialHelpText="Search Employees.." VisibleSuggestions="20" Rows="1" AllowMultipleEntities="false" Font-Underline="false" CssClass="ms-long ms-spellcheck-true textBoxSearch" />
and I am trying to call a JQuery from the same page,
$(".sp-peoplepicker-topLevel").keypress(function(e) { if(e.which == 13) { e.preventDefault(); $(".ms-srch-sbLarge-searchImg").click(); } })
I have tried many ways to achieve this but were failed..
Please anybody help me out to resolve this issue.
Kindly note that, I am using VS 2012 Visual web part and the people picker is working fine with the auto suggest and all..
Just want to force the user to select the match names by clicking on the auto suggest list and the user needs to press enter key to search some other data from AD. I have written the search query and all from server side by using a button click. So I badly need that button event to be fired when user press the enter key.
Please give me light to go..
Thanks in Advance.
Dinesh