Home > SharePoint Development > Deploy Infopath form with Feature in Sharepoint 2007

Deploy Infopath form with Feature in Sharepoint 2007

Approach 1. Publish InfoPath form and upload the form through Central Admin site (Central Administration >
Application Management > Manage Form Templates > Upload Form Template).

This is the easiest way to deploy InfoPath for in the form Template,

We can do the same thing with feature, see at Approach 2.

 

Approach 2. 

Suppose the name of InfoPath is “Site Provision Form.xsn”.

Step 1.

Create feature.xml file as below.

?xml version=1.0 encoding=utf-8?>

<Feature xmlns=http://schemas.microsoft.com/sharepoint/

Id=F900253E-F596-4f59-8860-73B6128CF04E

Title=Site Requisition Form

Description=This feature deploys the browser enabled
InfoPath Form.

Version=12.0.0.0

Scope=Site

DefaultResourceFile=SiteProvision

ReceiverClass=Microsoft.Office.InfoPath.Server.Administration.XsnFeatureReceiver

ReceiverAssembly=Microsoft.Office.InfoPath.Server, Version=12.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c
>

  <ElementManifests>

    <ElementManifest Location=elements.xml/>

    <ElementFile Location=Site Provision Form.xsn/>

  </ElementManifests>

  <Properties>

    <Property Key=Site Provision Form Value=Site Provision Form/>

  </Properties>

</Feature>

 

Step 2.  

Create elements.xml file as below. 

<?xml version=1.0 encoding=utf-8 ?>

<Elements xmlns=http://schemas.microsoft.com/sharepoint/>

  <Module Name=XSN Url=FormServerTemplates RootWebOnly=TRUE>

    <File Url=Site Provision Form.xsn Name=Site Provision Form.xsn Type=GhostableInLibrary/>

  </Module>

</Elements> 

Step 3.  

Create a folder named SiteRequisitionForm which contains all below
files in the following hierarchy

  

The SiteRequisitionForm folder will go to Feature folder in 12 hives.

Step 4.

Now the only thing to do is to install and activate the feature.

stsadm -o installfeature -name SiteRequisitionForm

stsadm -o activatefeature -filename SiteRequisitionForm
\Feature.xml
-url “http://localhost:port&#8221;

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: