Thursday, January 8, 2009

SharePoint Tutorial: Creating a Custom List Form for a SharePoint List

SharePoint has built-in forms for various actions on a list.

  • There is a form for displaying a selected item

  • There is a form for adding a new item

  • There is a form for editing an item



While the built-in forms are sufficient for the tasks at hand, you may run into a situation where the built-in forms do not satisfy your needs. For example: I had to recently create a list on a site collection. My business user wanted the other users to be able to enter their information in the form when adding it to the list. However, when they modify the record, the user should not be allowed to modify certain fields after they entered the information.

With SharePoint Designer 2007, you can create a custom form for any of the actions (display, add, edit) and attach it to the list.

I've created a document which illustrates how to create a custom list for a SharePoint list and attach the custom list to a list action.

I've also created a video illustrating how to customize the edit action.

If you have any questions, please post a comment or send me an e-mail, and I will answer your question to the best of my ability. You can get my e-mail address by viewing my Blogger profile.

6 comments:

Jennifer said...

Here's an additional tip:

If you want to customize the edit or the display form, and your list doesn't have any items on it, it won't work. You must have at least one item on the list in order to customize the edit or the display form.

Jennifer said...

Another tip - I noticed that if you have a date field as a required field, it gives you a hard time with setting the mode from edit to display.

Unknown said...

What if you are on a linux box and do not have sharepoint designer - howo do you create and upload a form to sharepoint?

Jennifer said...

Hi Ron,

You posed a really good question.

As far as I know, you have to have SharePoint Designer in order to be able to manipulate the "pages" on the site because technically, most of the "pages" aren't really pages at all. The pages are actually stored in a database. If one of the readers has another way, please feel free to post.

Anyway, to get back to your original question - you can use SharePoint Designer on Linux with a little bit of jury rigging.

Wine is an "emulator" that allows users to run Windows applications on Linux as well as Mac. I put "emulator" in quotes because it's not a full emulator, but it's a wrapper that allows a program written for the Windows OS to work on Linux. If you're running Ubuntu, I believe that the Wine package is already installed by default. I know that with Fedora 8, it's not. Here is the URL for the package - http://www.winehq.org/.

If you have a copy of Windows XP or Windows Vista, you can set up a virtual client on your Linux box to run SharePoint Designer in Windows (with network connectivity). I've used and like VMWare, but it's expensive. My students swear by VirtualBox (http://www.virtualbox.org/). They like it much better than VMWare and Virtual PC (I haven't tried it yet). Unlike VMWare, VirtualBox is free.

Unknown said...

Thanks for response - I was trying to avoid the VM solution as I find them slow/clunky and well I dislike windows immensely :) Having worked with some version of *nix since 1979 I'm a little set in my ways :).

I will try and hunt down virtualbox and see how that goes....

Though I was hoping for a solution I could type and upload..ah well.

Unknown said...

Today I read your post in YouTube and really is an eye opener. I am new to Sharepint designing. May I ask you how can I modify the field WIDTH in the List form so that it expands across the whole screen?
Appreciate a lot of your advice.