SharePoint 2013 Calendar People Picker setFieldValue

Home Forums Classic DFFS SharePoint 2013 Calendar People Picker setFieldValue

Viewing 4 reply threads
  • Author
    Posts
    • #19385
      Kasey
      Participant

        It seems that 2013 calendar people picker fields react differently than lists. I am attempting to setFieldValue and getting undefined. Is there a way to set a People Picker field within a Calendar form?

      • #19392
        Alexander Bautz
        Keymaster

          You are right, for some reason it doesn’t user the same picker control as the other forms.

          You can work around it using this code:

          // Set value
          jQuery("#dffs_ParticipantsPicker").find(".ms-inputuserfield").html("USER DISPLAY NAME");
          // Click the resolve picker icon
          jQuery("#dffs_ParticipantsPicker").find("a[id$='UserField_checkNames']").trigger("click");

          Change “ParticipantsPicker” for your field internal name.

          Alexander

        • #19394
          Kasey
          Participant

            Could this be a future enhancement? Should I add it to the requests forum?

          • #19400
            Kasey
            Participant

              Your solution worked nicely. Thank you. I attempted to set a rule on change of the people picker field to execute my function but that isn’t working either. I figured out a way around it but if you decide to add support of the setFieldValue could you also take a look at the on change issue? Thanks again.

            • #19407
              Alexander Bautz
              Keymaster

                I have added support for get/set field value and using it as a trigger in DFFS: https://spjsblog.com/2018/01/21/dffs-package-updated-to-v4-4-3-37/

                Basically I had to specify a fallback to SP 2010 functionaliy when handling people pickers in calendars.

                Alexander

            Viewing 4 reply threads
            • You must be logged in to reply to this topic.