سؤال

Is JSLink exclusive to default forms?

The JSLink field exists on my default forms, like below:

Default form

However, it does not work when I create a new custom form via SP Designer, as below:

Custom Form

Is this expected?

How can I add JsLink to a custom form?

هل كانت مفيدة؟

المحلول

When you use designer to create a form - it creates a stone age webpart DataFormWebPart that does not have JSLink property. Only XSL Link

Starting form SharePoint 2013, the forms use ListFormWebPart webpart. It does have JSLink.

If you want SharePoint Designer to create forms - then follow these steps:

  • Create a new form
  • Borrow the node < ZoneTemplate > from the default form
  • Replace your new form's < ZoneTemplate > with the one you copied from the out-of-the-box one.

P.S. I don't like the idea of using SharePoint Designer in 2018. There are very few legitimate cases when it's justified, but it's a topic for a different discussion

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top