Question

I am trying to add the following code:

<SharePointWebControls:UserField FieldName="Site Owner" runat="server"></SharePointWebControls:UserField>

in a Script Editor Web Part.

However, nothing happens.

Does the Script Editor Web Part support this?

Was it helpful?

Solution

No, Script Editor web part just supports HTML/CSS/JavaScript/jQuery code, it is not available for SharePoint server web controls.

You can add the code into the page via SharePoint Designer 2013 instead of Script Editor web part.

A demo for your reference:
enter image description here

The result is:
enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top