Tag Archives: SharePoint Designer

SharePoint Designer

Modifying New Item form to delete/rearrange columns

Another request I’ve had is to hide columns on the new item form which in my case required the use of SharePoint Designer again. Details below.

  1. Within SharePoint Designer navigate to your list, create a new item form and edit in advanced mode (right click to edit in advanced mode).
    editformeditinadvancedmode
  2. Search for your column name and highlight the code within the <tr></tr>, this can then be re-arranged in order or deleted as per the below, save the form and preview in browser.
    newformremovecolumn

Prevent users from editing a column

A recent request I had was to prevent users from editing a column once the item had been created. This had to be done in SharePoint Designer, sure you can get around this with the quick edit option in SharePoint however, in my list quick edit was turned off to prevent this.

  1. Open SharePoint Designer and navigate to the list, create a new edit form and edit in advanced mode.
  2. Look for your column name and find the control mode within the SharePoint:FormField line. You will notice the ControlMode is usually set to ControlMode=”Edit”, change this to ControlMode=”Display”, save the form and check SharePoint for the results.<td width=”400px” valign=”top” class=”ms-formbody”>
    <SharePoint:FormField runat=”server” id=”ff6{$Pos}” ControlMode=”Display” FieldName=”DueDate” __designer:bind=”{ddwrt:DataBind(‘u’,concat(‘ff6′,$Pos),’Value’,’ValueChanged’,’ID’,ddwrt:EscapeDelims(string(@ID)),’@DueDate’)}”/>
    <SharePoint:FieldDescription runat=”server” id=”ff6description{$Pos}” FieldName=”DueDate” ControlMode=”Edit”/>
    </td>

    The end result is shown below, this is the edit form in SharePoint.
    DueDate

Hide Lists or Libraries from Site Contents page

In the Site Contents page, there can be many lists, libraries or other apps. While searching for a specific item this can be difficult if there are over 50 apps on the screen, some lists may just be used for back end results such as look-ups. So hiding lists and libraries that aren’t being used is simple, alternatively you could just Ctrl F the page and search your for your list. This change requires SharePoint Designer.

  1. Open SharePoint Designer and navigate to your list or library. On the information page, under settings is a tick box for “Hide from browser”, once ticked this will no longer show in SharePoint.
    HideFromBrowser

    Unfortunately, if you are wanting to unhide this, it will no longer display in the lists and libraries in SharePoint Designer (SPD). You will be required to go to the ‘All Files’ object and choose lists, this will then show the list that’s hidden. Find your list, right click and go properties, then remove the check box to hide the list.

Modifying the Ellipses

Within SharePoint the ellipses is used on the title column which is standard out of the box, unfortunately in my scenario the title column wasn’t being used and therefore, needed to transfer the ellipses to another column. This requires SharePoint Designer to change the column to what you want.

  1. Within SharePoint Designer, navigate to the list or library of your choice, in my case I’ve chosen a list. Within the list, choose a view to modify (usually the default view), right click the view and choose “Edit File in Advanced Mode”.
  2. Search for “<View Name=“, this is usually the longest line towards the bottom of the code. Find the part which states <FieldRef Name=”Your-Column-Name” /> and add ListItemMenu=”TRUE”. The end result should look like the below.
    ListItemMenuCode
    When you check the result in SharePoint, the ellipses will now be showing on your new column.
    HighMediumLowEndResult