SharePoint 2013マークアップコードはPlaceHolderMain内で機能しますが、コードとしてはWebPart(EmbeddedFormField)に埋め込まれていませんか?

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

質問

SPO 2013では、リストをバインドするためのカスタムマークアップコードを展開しようとしています

マークアップコードは、SPD VSを介してプレースホルダメインに配置されたときに、コードサイトページの埋め込みページWebPart(EmbeddedFormField)

私はSPD 2013を使用してSPD 2013を使ってPlaceHolderMainに配置すると、このコードが完全に機能します。ただし、SPO編集ページを使用すると、データがドロップダウンコントロールにバインドされません。コントロールには何もない。

<div id="uploadDiv">
   <label id="fileSelectorLabel">Select a file: </label>
   <input id="uploadInput" type="file"/>
   <script id="selection-options" type="text/x-jsrender">
    <option value="{{>#data.get_item('Name')}}#{{>#data.get_item('Title')}}#{{>#data.get_item('Department')}}">
      {{>#data.get_item('Name')}} 
    </option>
   </script>
   <select id="FacultyLookup">
   </select>
   <input id="clearUploadFormButton" type="button" value="Reset"/>
   <input id="uploadFileButton" type="button" value="Upload"/>
</div>
<div id="message">

</div>
.

または埋め込みスニペットからjQueryファイルを呼び出すことができない問題です。

役に立ちましたか?

解決

One technique you might try is using a Content Editor Web Part. To ensure SharePoint doesn't mess with the code, you could add the code in a text file to the site. Then in the properties of the CEWP, reference the URL to the text file. This will render the contents of the text file in the web part.

enter image description here

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