문제

I have a list instance being created from a SharePoint Hosted App. How can change the JSLink reference from within the list definition, schema.xml ? I can change it on a List view like so:

<JSLink>~site/Scripts/customRenderer.js</JSLink>

But how do I change it for newForm.aspx? Is there a JSLink attribute buried in this XML?

<Forms>
      <Form Type="DisplayForm" Url="DispForm.aspx"  SetupPath="pages\form.aspx" WebPartZoneID="Main" />
      <Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx"  WebPartZoneID="Main" />
      <Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
</Forms>
도움이 되었습니까?

해결책

You can do it as

<Form Type="NewForm" 
      Url="NewForm.aspx" 
      SetupPath="pages\form.aspx" 
      WebPartZoneID="Main" 
      JSLink="~site\path\jslinkfile.js" />
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top