sharepointsharepoint-2013custom-field-type

How can I get my custom field type (lookup) to render in list view on SharePoint 2013?


I have a custom field type that was built for SharePoint 2010 that I have installed on SharePoint 2013 Foundation. The wsp installed perfectly and I get all the same functionality.

The one problem I am having is how the information is displayed in the list view. I am inheriting an SPFieldLookup and am not doing anything to override how this is displayed in the list view.

On SharePoint 2010 it renders perfectly as a hyperlink to the item which opens the standard pop out window on click etc. On SharePoint 2013 Foundation however the html doesn't render properly at all- it is almost as though it is displaying as plain text.

SharePoint 2010:

SP2010

SharePoint 2013 Foundation:

enter image description here

My question is how can I get the lookup value to render properly on SharePoint 2013?

The same version of the wsp in installed on both machines.

Unsure as to whether this was simply a browser or client side issue I added a standard lookup field to the list and it renders fine!


Solution

  • In SP 2013 by default field rendering is done on client side. Concept of JSLink has been introduced if you want to change the look and feel of field. However by ClientRender=False in new form url you can force it to server render mode.