Deploying InfoPath forms Using Features – the Right Way

Saturday, July 25, 2009 12:48 AM

A week back couple of my friends was asking is there a proper way to deploy the InfoPath forms to the server, Way other than File -> Publish - > SharePoint server with or without forms server. I did a quick search and was not lucky, came to a lackadaisical conclusion that there is no other way. But whenever I deploy workflows with InfoPath form I see a new solution that adds itself to the Solution Store. By this I know for sure there is some other way to deploy InfoPath forms. First thing want I wanted was to get the

Solution out of SharePoint and see what's there inside, Again for this there is a tool through which you can do it [I lost the url from where I got it] or hardly 10 lines of code is all what you need.

To my surprise there is indeed a way to do it, well let's see how. What I got out of that solution is a feature, what's in it [Image speaks louder than words, image with comments even louder ;) ] ]

Feature.xml

Element.xml

################### You are Right its again another File Provisioning in to SharePoint Lib #####################

############# Be sure to put the location as FormServerTemplates############

Here is the Stripped Out Version of the XML.



Steps in Short:

  • Develop your IP form.
  • Publish it to the network location as how you do to upload to the Central Administration Upload Form Templates.
  • Create one Feature.xml, Element.xml as defined in the article [Sorry how workflow does ;)].
  • Put in the IP form and create a feature out of it.
  • Its all. 
 
Please add 2 and 2 and type the answer here: