c# - ClientPeoplePicker in CustomForm -
i have calendar , have few customer fields , taking input through custom form. custom form defaults using sharepoint:formfield people picker; have included clientpeoplepicker using following
<sharepoint:clientpeoplepicker required="true" validationenabled="true" id="peoplepciker" runat="server" autofillenabled="true" visiblesuggestions="3" rows="1" allowmultipleentities="false" cssclass="ms-long ms-spellcheck-true" height="85px" /> could please advise how can 'link'/bind output of peoplepicker field in calendar list?
i using sp_designer2013 , sharepoint client , not have access backend/server in other shape/form.
any highly appreciated.
thank you
i know late looking answer , thought i'd share solution.
old control
in new form had control wanted replace clientpeoplepicker.
<sharepoint:formfield runat="server" id="ff2{$pos}" controlmode="new" fieldname="person" __designer:bind="{ddwrt:databind('i',concat('ff2',$pos),'value','valuechanged','id',ddwrt:escapedelims(string(@id)),'@person')}"/> new control
the new clientpeoplepicker needs same id attribute control wanted replace.
<sharepoint:clientpeoplepicker runat="server" id="ff2{$pos}" /> edit
i found forum listed of control's attributes , thought i'd post them whomever should stumble upon question.
<sharepoint:clientpeoplepicker required="true" validationenabled="true" id="pplpickersiterequestor" uselocalsuggestioncache="true" principalaccounttype="user" runat="server" visiblesuggestions="3" rows="1" allowmultipleentities="false" cssclass="ms-long ms-spellcheck-true user-block" errormessage="*" /> <asp:customvalidator id="cvpplsiterequestor" runat="server" controltovalidate="pplpickersiterequestor" forecolor="red" clientvalidationfunction="checksiterequestor" errormessage="user required field" validationgroup="siteaccessform" text="*"> </asp:customvalidator> function checksiterequestor(sender, args) { args.isvalid = false; var usercount = $("span.ms-entity-resolved").length; //returns usernames count if (usercount === 1) { args.isvalid = true; } }
Comments
Post a Comment