Migration Tip of the Week: InfoPath List Forms

InfoPath Forms Services, which was introduced in the Enterprise edition of SharePoint Server 2007, gives us a lot of power in terms of enhanced data collection in SharePoint applications. You can publish an InfoPath form to a Form Library to capture and process rich XML forms which are rendered right in the browser. InfoPath 2010 has been integrated with SharePoint 2010 even further. Now you can replace standard ASP forms that come with lists and libraries (i.e. display, edit, new) with your own forms that take advantage of the advanced features in InfoPath. The best part is that you can design those forms without writing any code.

As I am a migration guy, I'm primarily interested in how my customers can keep those cool InfoPath forms when migrating their sites and lists using Quest Migration Suite for SharePoint.

The answer is that you can transfer InfoPath list forms to their new location using Migration Suite, SharePoint Designer and InfoPath. Wondering how? Read on!

  1. The first step would be using Migration Suite to copy the list to a new location. In order to copy the form files, you will need to check the Copy SharePoint Designer Objects option in Profile Manager:

    In case you wonder what Copy InfoPath does, it includes InfoPath forms when you copy forms libraries.
  2. Next just copy your site or list. You can veryfy that the form files were copied successfully in SharePoint Designer 2010 or in Migration Suite directly (use the Show SharePoint Designer Objects command in the right-click menu on the target list). The files should be located under the folders corresponding to attached list content types:
  3. If you try to use the forms now (e.g. add a new list item), you will still see the standard list form. To fix that, we will need to use SharePoint Designer 2010.
  4. Connect to the target site in SPD and go to All Files
  5. In the All Files view, locate the list folder under Lists and then drill down to the Item subfolder (your CT may differ):
  6. Double-click on the InfoPath form template file (template.xsn) to open it in InfoPath 2010
  7. InfoPath will show a warning message, asking you to update the form fields. Click yes and re-publish the form
  8. What InfoPath does at this point, it adds a new form template to the list and another Browser Form web part into each of your form ASPX files. This prevents form files from being rendered properly. So we need to fix this little problem in SharePoint Designer.
  9. Go back to All Files and open the display ASPX form for editing in code view. Most of the file contents in the file (highlighted) is coming from a master page. You will need to scroll down to the Zone Template element.
  10. Next you just comment out the web part that points to the original form template (template.xsn) and save the file:
  11. Repeat 9 and 10 for each ASPX form.

You're done!

Naturally there is no limit to creativity of form designers. You might run into forms that use data connections and other advanced capabilities, which will require a few extra steps to make the form work. I hope this posting arms you with a general technique to approach InfoPath list forms migration.