Learn more about SQL Server tools

mssqltips logo
 

Tutorials          DBA          Dev          BI          Career          Categories          Webcasts          Whitepapers          Today's Tip          Join

Tutorials      DBA      Dev      BI      Categories      Webcasts

DBA    Dev    BI    Categories

 
Best Practices for Migrating SQL Server to Azure - free webinar
 

Customize SharePoint Custom Lists Using MS InfoPath 2010


By:   |   Last Updated: 2011-09-20   |   Comments   |   Related Tips: > Sharepoint

Problem

The default SharePoint 2010 list forms (DispForm , EditForm & NewForm) are quite generic (as they were with previous SharePoint versions).. Wouldn't it be great to be able to customize the look & feel of them?

InfoPath 2010 to the rescue...

Solution

Microsoft InfoPath 2010 makes designing and publishing electronic forms easier than ever. InfoPath enables you to create powerful, interactive forms without writing any code. With a few clicks, an Office user can customize SharePoint list forms, add custom layout elements, and add business rules to validate the data. In addition to working with the forms online while connected to SharePoint Server 2010, you can also take the list and associated forms offline, and then work with the forms in SharePoint Workspace.

InfoPath is based on Extensible Markup Language (XML). When you design a form template, InfoPath creates an .xsn file, which is a cabinet (.cab) file that contains the files necessary for the form to function, such as XML Schema (XSD) and XSL Transformation (XSLT) files. When a user fills out a form in InfoPath, the data in that form is saved or submitted as industry-standard XML. However, you don't have to know anything about XML to design a form template or fill out a form. The point is that XML can make it easier for your organization to repurpose the data that it collects by using forms.

Let's see how to customize a SharePoint custom list using MS InfoPath 2010 designer:

- Assume that we have a SharePoint custom list named "MSSharePointTips IFP" with the following columns "Name , Age , Address & Birth Date":

all items

- When we click on "Add new item" link we'll see:

new item

- Click the "Customize Form" button under "List" settings at the ribbon option "List Tools":

list tools

- InfoPath Designer 2010 will be launched and add the "MSSharePointTips IFP" columns fields at a custom InfoPath "New" entry form :

info path

- Let's customize the fields, making them bold and setting the font-color to be red". Save the form, then click on the "Preview" button:

attach a file

- Here's the form after applying a set of customizations in preview mode. Click on "Close Preview" button.

spelling

- Click on the "Quick Publish" button or use "Ctrl + Shift + Q":

quick publish

- Wait until receiving the confirmation message: "Your form template was published successfully"...

publis

- If we return back to the "MSSharePointTips IFP" list and click on the "Add new item" link , we'll see our customizations:

add new item

- If we want to revert (rollback) our InfoPath customizations and return to the SharePoint default settings, click on the "List Settings" button under "List" settings at ribbon "List Tools":

list tools

- Click on "Form Settings" under "General Settings":

form settings

- Select "Use the default SharePoint form" and check "Delete the InfoPath Form from the server" then click OK:

form options

- Now if we click on "Add new item", we'll see the SharePoint default entry "New Item" form:

new item
Next Steps


Last Updated: 2011-09-20


next webcast button


next tip button



About the author





Post a comment or let the author know this tip helped.

All comments are reviewed, so stay on subject or we may delete your comment. Note: your email address is not published. Required fields are marked with an asterisk (*).

*Name    *Email    Email me updates 


Signup for our newsletter
 I agree by submitting my data to receive communications, account updates and/or special offers about SQL Server from MSSQLTips and/or its Sponsors. I have read the privacy statement and understand I may unsubscribe at any time.



    



Learn more about SQL Server tools