I have a form where I used a People Picker control. I would like to get the username entered into a people picker control using jQuery.
Please suggest?
|
I have a form where I used a People Picker control. I would like to get the username entered into a people picker control using jQuery. Please suggest? |
|||||||
|
|
To leverage your work, you can use SharePoint jQuery based library to work with your forms and fields: jPoint - jQuery for SharePoint forms, lists, webparts, and webservices And then you just do: |
|||
|
|
|
Here is a plain jQuery example. I can't take credit for it, I believe Marc Anderson came up with it. Just change the column variable with the display name of your column.
|
|||
|
|
|
unfortunately, you can't just check for the .value of a "People Picker" field, you have to test the textarea to see if something is in there and/or if the validated name is in the associated div. The following function will return true if the people picker is valid... note the 'requireValid' parameter, if this is false, it will return true if just something is typed into the people picker... if this parameter is true, it will require that the name is also validated.
|
|||
|
|