spjs.ac.peoplePicker

Forums Autocomplete spjs.ac.peoplePicker

This topic contains 11 replies, has 2 voices, and was last updated by  Kasey 12 hours, 13 minutes ago.

  • Author
    Posts
  • #26007

    Kasey
    Participant

    I have a need for a user to select someone from a group. The out of the box people picker configured this way requires the user to input a portion of the name before any results are returned to select. I thought I could use spjs.ac.peoplePicker with the listOpsionsOnFocus set to true to show all users in the group on focus. Is there a way to make that happen?

  • #26017

    Alexander Bautz
    Keymaster

    I guess this should work – have you tested it? – here is a link to the configuration example: https://spjsblog.com/dffs/dffs-plugins/spjs-autocomplete/#Autocomplete_in_a_people_picker

    Please note that if you use SP 2013 you must set forceOn2013 to true.

    Alexander

  • #26025

    Kasey
    Participant

    It works but you must know a portion of the target user’s name or email address. Setting listOptionsOnFocus to true doesn’t change the behavior. My hope was that if that was set to true when you click into the control it would show the first [rowlimit] number of users in the group to select from.

  • #26037

    Alexander Bautz
    Keymaster

    That would be the expected behavior, but maybe I have a bug related to the listOptionsOnFocus setting. To be honest I have not focused on the people picker implementation since SP 2010 now that SP 2013+ have autocomplete on the pp already.

    Just a little checkup: You have written the setting like this: listOpsionsOnFocus, but the correct format is this: listOptionsOnFocus. I guess it’s just a typo here, but if not you can try correcting it in the function call.

    I’ll look at it and see if I can get it in the next DFFS release – hopefully during next week.

    Alexander

  • #26041

    Kasey
    Participant

    It was just a typo in the blog post. I copied the function from the documentation and changed false to true. When I click into the control nothing happens until I start typing. I appreciate you looking into it!

  • #26055

    Alexander Bautz
    Keymaster

    I’ll look into it when I return from an little vacation in the beginning of next week.

    Alexander

  • #26120

    Alexander Bautz
    Keymaster

    I tested now with the latest version and it does list the users when I focus the field – which version of spjs-ac are you running?

    Alexander

  • #26122

    Kasey
    Participant

    1.6.28

  • #26131

    Alexander Bautz
    Keymaster

    I have made some changes since that version (not published), but cannot remember to have fixed this issue. You can try the attached version to see if it’s actually fixed.

    Alexander

  • #26149

    Kasey
    Participant

    I tried with the new version with the same results. Below is the code I am using for reference. Maybe I have one thing out of line that is causing the behavior?

    Person is a Person or Group type field; allow multiple selections = no; allow selection of = people only; Choose from = Person Group; enforce unique values = no

    spjs.ac.peoplePicker({
    “applyTo”:”Person”,
    “forceOn2013”:true,
    “helpText”:””,
    “showField”:”Title”,
    “enforceUniqueValues”:false,
    “chooseFromUserGroup”:”Person Group”,
    “showUsersOnly”:true,
    “rowLimit”:20,
    “listOptionsOnFocus”:true,
    “reValidateOnLoad”:true,
    “setFields”:[]
    });

  • #26157

    Alexander Bautz
    Keymaster

    Try the attached version – ensure it shows as v1.6.34 when you load the form (by clicking the Enhanced with DFFS link and clicking the License and version information link).

    Alexander

  • #26160

    Kasey
    Participant

    PERFECT! Thank you!!

You must be logged in to reply to this topic.