0

I have created a custom field type for a SharePoint 2013 list using the JSLink method. It is basically a rich text editor that uses Ckedit.js. It works fine with SharePoint's default new/edit forms for lists.

However, when I create a custom Create/Edit form for this list using SharePoint Designer, the JSLink custom field doesn't work because the javascript file is not even being loaded.

When I opened the code of the form in Sharepoint Designer, it looks like this:

<xsl:template name=...>
...
</xsl:template>

I understand it means that this is a server-rendered form, rather than a client-rendered form.

My ultimate goal is basically to create a tabbed interface for the New/Edit form, this is why I'm trying to create a custom New/Edit list form in Sharepoint Designer. Can I do that without avoiding JSLink for my custom field type, and how? Or do I have to rewrite my custom field so that it doesn't use JSLink?

Thanks.

  • By the way, I've seen this post but I simply don't have the JSLink option in web part properties for a form created by Sharepoint Designer. Under Miscellaneous, there is only Sample Data, XSL Link, Enable Data View Caching and Send first row... sharepoint.stackexchange.com/questions/117499/… – K48 Jun 27 '16 at 6:23
  • And when using PowerShell, I get this when I try to set the JSLink property of a field: "The property 'JSLink cannot be found on this object. Verify that the property exists and can be set." – K48 Jun 27 '16 at 6:30
  • Can you set the JSLink on the WebPart (edit page in browser, not Designer)? – Danny '365CSI' Engelman Jun 27 '16 at 7:35
  • Yes, if I edit the standard/default New/Edit page from within Sharepoint itself, there is an option for a JSLink. However, it seems to have no effect, I suppose because the JSLink gets tied to the whole webpart rather than to a specific field. Therefore Sharepoint doesn't call the functions it needs to call in this JS, such as the function to obtain the value, initialize element etc. – K48 Jun 27 '16 at 7:38
  • Include your CSR code in your question, if you declared the Field correct it overrides <period> CSR is basically: "SP If you are going to display this field [name] then use this JS function for the HTML" – Danny '365CSI' Engelman Jun 27 '16 at 8:12

Your Answer

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

Browse other questions tagged or ask your own question.