SharePoint 2013 NewFormのカスタムCSRレンダリングモード(Dispform and ViewFormの場合も)レンダリング入力コントロールはラベルから

sharepoint.stackexchange https://sharepoint.stackexchange.com//questions/92493

質問

数週間の場合、Client Side Lonedering(CSR)と呼ばれる新しいテクノロジを使用して、SharePoint 2013の新しいプロジェクトのいくつかの機能を開発しています。これまで、文書の欠如や高度な例の欠如を除いてほとんど問題はありません。

意図:

新しいフォームをカスタマイズし、その他のフォーム(DataViewWebPartではなく)(DataViewWebPartではなく)でレンダリングされるようにして、フィールドをレンダリングすることができます。レイアウトを変更し、複数の列などを作ります。すでに書かれたJSLinkフィールドテンプレートを使用したいので、サーバーレンダリングとXSLTは私が探している方法ではありません。

標準のCSRレンダリングモードを使用する場合は、Template.Itemをオーバーライドできませんが、フォームのWebPartのカスタムCSRレンダリングモードを使用している間に実行できます。

CSRレンダリングモードのスクリーンショットI WebPart設定から使用します

問題:

CSRカスタムレンダリングモードがオンの直後(カスタマイズを追加する前に)、WebPartはフィールド入力コントロールをこれらのフィールドラベルとフォームのテーブル自体とは別にレンダリングします。

"new"モード でフォームのレンダリング方法のスクリーンショット

"編集"モード でフォームのレンダリング方法のスクリーンショット

"Display"モード でフォームのレンダリング方法のスクリーンショット

なぜこれが起こっているのか?

SharePoint Renders OOBを取り除くことができれば、ラベルの自己レンダリングを書き込んでいません。

これはいくつかのバグですか?

任意のアイデア?

役に立ちましたか?

解決

It seems that the Custom mode was not really tested by MS. I've been digging into the Custom mode for several days, and I actually found a workaround, although I don't think it really pays off to use it.

You can find example of using this workaround to create a tabbed list form on CodePlex:

Here is the screenshot of the resulting form:

enter image description here

The main problem is that you have to employ a rather big amount of code to make it work. And even then, it doesn't work perfectly. I had to apply a rather ugly hotfix to recover Modified and Created info. And also using this method, you have to generate field labels manually.

Some advices of how you can change form layout in Standard mode can be found in this article (see "Example: manipulating form layout"):

ライセンス: CC-BY-SA帰属
所属していません sharepoint.stackexchange
scroll top