Wednesday, 22 April 2009

Creating a simple feedback or request form Web Part using SharePoint Designer

Here are some steps you can use to create a Web Part using SharePoint Designer that displays a new item form for a list with a submit button. It provides an interface for users to be able to post feedback or requests for information (brochures, documents, etc.) without having to go to the standard new item form for the list. The advantage here is that you can add this Web Part to a dashboard or home page to provide a better user experience.

  • First, we need to create the list. In this example, I would like to give users the option of requesting a number of different brochures. I have created a custom list called “Brochure Requests” with the following columns (I have renamed the default “Title” column to “Your Name”) – The “Brochure Type” column allows the user to choose which documents they wish to be sent:

image

  • Go to the page on the site where the Web Part will be created (To prevent the live page from being customised by SharePoint Designer, you may want to create the Web Part on a dummy page in the same site, export it to a file, import it on the live page, and delete the dummy page).
  • Edit the page in SharePoint Designer, click on the Web Part zone, and select Insert Data View from the Data View menu.
  • From the Data Source Library, click on your custom list and select Show Data.

image

  • Select the columns that you would like to show in the Web Part (for my example, I have chosen Your Name, Your Address, and Brochure Type), click the Show Selected Fields as… button, and select New Item Form.

image

  • The Web Part will now appear in the page. From here you can change all sorts of options to style it how you want. I need to change the text on the Save button to Submit, so I have double-clicked the button and changed the Value/label setting.
  • Once finished, save the page.
  • Go to the page in the browser and give it a try.

image

When users click the Submit button, the item will be created in the list. Because the columns are referenced directly from the Web Part, if you make any changes to them (e.g., add a new brochure type), these will automatically appear in the Web Part.

Once this has been done, you can start adding more out-of-the-box functionality to the list. For example, you could set up an alert on the list so that members of the reception desk receive an e-mail when a new brochure request has been posted. They can then go to the item directly from the e-mail and send the brochure to the address specified by the site visitor. You could also have a “Brochure Sent” yes/no column created in the list that was exposed in a “Brochures to be sent” list view, so that reception workers can view outstanding items and confirm when a brochure has been sent to clear it from the list view.

Friday, 17 April 2009

Free (High Quality) Sharepoint Web Parts

This site has a few really handy Web Parts, but best of all, they’re free! They include:

  • Media Player Web Part which supports playing MP3, SWF (Flash), AVI, WMV, MP4, MPG, MPEG, YouTube and MOV (QuickTime) files from a SharePoint Library
  • Nice looking digital clock Web Part which displays the time in different zones.
  • Picture Lightbox Web Part
  • Flash rotator Web Part
  • Slideshow Web Part
  • And many more!

Great work from Amrein Engineering – if only others took their lead rather than charge for even simple Web Parts…

Free Sharepoint Web Parts

Tuesday, 7 April 2009

Launching desktop applications from a Web Part

If your looking for an easy way to create a Web Part which allows users to launch applications from a page on a SharePoint site, then it can be done with the Content Editor Web Part, as pictured below:

All you need to do is create some HTML tables and add the following hyperlink code to a cell in your table, copying your images wherever your image source code locates them:

<a href="javascript:LaunchApp('C:\\Program Files\\Microsoft Office\\Office12\\MSPub.exe')"><img alt="Launch Microsoft Publisher" src="images/PublisherIcon.jpg" width="54" height="54"></a>


You will also need to set "Prompt" or "Enable" for the "Initialize and script ActiveX controls not marked as safe for scripting" security option in Internet Explorer for the zone in which the portal is accessed. If this is an intranet, this should be fairly straightforward as your site should already be present in the "Local intranet" security zone, and more often than not controlled by a Group Policy. This is more difficult if your site is accessible as an extranet site because these machines a) may not trust the site and b) are quite often not controlled by a Group Policy. Obviously, this will relax the security for that zone in the browser, so do not modify this option unless you are sure about doing so.

I have uploaded the Web Part and images shown at the top of this article to the following location if you wish to have a look at or use my example - http://cid-3db995be5d5d9d8f.skydrive.live.com/self.aspx/Public/Launch%20Applications.zip.