Blog

SharePoint

Lookup fields in Word documents

A few days ago I tried to use a SharePoint Lookup field as a Quick Part in a Word document. Doing this I came across two issues: Not all lookup values can be selected in the Word document; If I change a lookup field using the edit form of the document, the Word document is […]

Read more...

Javascript to give a richtext field the same style as the page

If you use a richtext field in a list form, the style in the richtext control is different to the style on the page. This is because the richtext field uses an iframe and there is no style applied to the iframe document. So the iframe uses the default font configured in the browser’s settings. […]

Read more...

How to: Enable Session State in SharePoint 2010

By default the Session State in SharePoint 2010 is disabled. The HttpContext.Current.Session will be null in this case and the following code will fail with a null exception:public static IAPIProfile SessionProfile { get { return (IAPIProfile) HttpContext.Current.Session[Constants.PROFILE_KEY]; } set { HttpContext.Current.Session[Constants.PROFILE_KEY] = value; } }   Enabling the Session State Locate your Web App’s folder […]

Read more...

How to: Configure RSS feeds for your CKS:EBE blog

This blog is running on SharePoint 2010. To ensure user friendly URLs we installed the Community Kit for SharePoint Extended Blog Edition 3.0 published on codeplex. After we have activated the “CKS:EBE Extensions” features everything worked just fine, except the RSS feed. To solve this issue you have to edit your web.config. In the HttpHandler […]

Read more...

How to: Set default values in a SharePoint new form using javascript/jQuery

SharePoint does not allow you to set default values for multi text and rich text fields. This article describes how to set default values in a rich text field using jQuery. You can use the code to set the default description in an inviting calendar event. 1. Edit the new form and add a content […]

Read more...

How to: Validate an e-mail address in a SharePoint text field – validation rule

In list settings change the column’s validation settings to: =(LEN(LEFT([Attendees (external)],FIND(“@”,[Attendees (external)])-1))>=1)+(LEN(RIGHT([Attendees (external)],LEN([Attendees (external)])-FIND(“.”,[Attendees (external)],FIND(“@”,[Attendees (external)]))))>=1)+(LEN(MID([Attendees (external)],FIND(“@”,[Attendees (external)])+1,FIND(“.”,[Attendees (external)],FIND(“@”,[Attendees (external)]))-FIND(“@”,[Attendees (external)])-1))>=1)+(ISERROR(FIND(” “,[Attendees (external)]))=TRUE)=4

Read more...

How to: Change the look and feel of forms created with the SharePoint Form Web Part using CSS

This article describes how to change the look and feel of the forms created with the SharePoint Form Web Part using CSS. A SharePoint form usually looks like this: The SharePoint Form Web Part allows you to change the layout from two columns to two rows, so that the field name is displayed directly above […]

Read more...