3

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>
4

You can do it as

<Form Type="NewForm" 
      Url="NewForm.aspx" 
      SetupPath="pages\form.aspx" 
      WebPartZoneID="Main" 
      JSLink="~site\path\jslinkfile.js" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.