Delphi Technology Solutions - development, websites, computers and networks

Development   |   Computers & Networks   |   Websites   |   Products & Services   |   Client Success   |   News

David's Ramblings on Development

SharePoint, InfoPath, .Net and more




Customizing SharePoint List Forms

Share |
clock October 22, 2007 17:41 by author David Lozzi

Specifically to Windows SharePoint Service 3.0, creating a custom form is rather easy. It took me a while to get this routine down and now I can create a custom form entry screen in minutes. When I say customizing a form, I'm speaking specifically to changing the layout of the EditForm, NewForm and DisplayForm pages for a list. You can customize these pages so you can have more columns than provided, make the form match the original paper form or remove certain fields from the NewForm but you want on the EditForm.

First, Create the list! Yeah, an easy one. I suggest ordering the columns in the List Settings area of SharePoint before trying to customize the forms. Also, the larger the list, the more painful this may be. We'll be using SharePoint Designer which appears to be a hog of an app on certain computers. From what I can tell, every change you make, like dragging a field to another cell in the table, SD will refresh the page and requery SQL for all of the field names and properties. This process can take a long time if you have 30 or more fields. I have a list with about 60 and it's a good 10 seconds before I can edit another item on the page.

Second, Open the WSS site in SD. Go to the list and the page you want to edit, for example NewForm.aspx. Right click on NewForm.aspx and select Copy. Then right click on the List Name and click Paste. This will create a backup copy of this form in the even you blow it up, which I have done so many times. Doubleclick and open the original file, NewForm.aspx.

Third
A. You will see a three field web part in the middle of the page. This is the default webpart that displays whatever fields in whatever order they are defined in the list settings.

B.
Switch to Split view in SD so that you can view code and the designer. Click on this web part and the code above will then highlight the code that makes up the web part. Look for tags IsVisible and change it from true to false. This will hide the default form.

C. Click on the web part in the design view again then press your right arrow. This will move the cursor to right after the web part but still within the web part zone. Go to the Insert menu, select SharePoint Controls then Custom List form. A small dialog window will appear, select the list name from the first drop down, then select the content type from the second drop down. Finally select which form you want to insert, New, Edit or Display. Click OK. The new form will be displayed under the default form, and you will then see all of the fields in order.

Finally
Now customize your form! Move fields around, delete rows, change formatting, whatever you need to do. Click save and when you go to access the form through the SharePoint site you should see your new updates.

A few notes:
I have found that it is important for the default form to remain, step Third B is important to complete. If you delete it, your new custom form will work but the list may not default to your form for the sake of creating a new item, or editing. If you go to the Properties of the list in SD, then go to the Supporting Files tab, you will see what the three files the list relys on for displaying, editing and creating. If you delete the default form in the NewForm.aspx, the New Form item field in the Supporting Files property may be empty and is a pain to get back in there until you put the list form back into your page.

When you change a form to a custom view, you lose the history list for multiline textboxes. To get it back, put the following line of code where you want the history to appear:  < SharePoint:AppendOnlyHistory runat="server" FieldName="Comment" ControlMode="Display">


Thanks for reading, I hope this helps!!





Verizon FiOS

Share |
clock October 12, 2007 17:41 by author David Lozzi

So, I just wanted to give a little shout out to Verizon for an exceptional product: FiOS. I just got FiOS at my home, but our office has had FiOS internet for several months now. On the TV side, the image quality is significantly better, brighter and crisper and that's on a glass tube TV! I was very happy to see the improvement over Directv. Also, their menu interface is a lot cleaner, and crisper than that of Directv or Comcast. It feels more like a computer interface than a console for the TV. There are also some great items like widgets (get traffic and weather on screen) and of course On Demand. We have the Premium package which includes 200 channels, and it's cheaper than Comcast and Directv.

Their internet is pretty darn sweet as well. At the office we have a business package of 5 static IPs, 20MB down and 5MB up. Amazingly fast, in mere seconds we have service packs downloaded. And it's stable and very reliable. The hardware they setup is also great. Wireless, firewall, static NATs: what more can a guy ask for? Our home connection has 5MB down and 2MB up. We use to have DSL and that was painfully slow. Using SpeakEasy.net Speed Test our home connetion gets about 4000KB down, DSL got under 1000KB. Also, another benefit of Verizon is that they will install to anyone within reach. I live down a dirt road and Verizon had to run new wires for FiOS 2900 feet to get it to my house, and it's still blazing fast. DSL slowed down a lot over the long distance. Comcast wanted $3,000 to run their wires down to our house!

I love Verizon's FiOS services. I know of other residential and business customers who LOVE it as well. That's it for now.




RSSRSS Subscribe

About David Lozzi

I love what I do. I'm not the sketchy type that hides in his basement coding all day. I have a beautiful wife and two great children. I've spent my last 10 years plus in the technology arena. more...

Login