Thursday, April 16, 2009

Deploy InfoPath Form Templates to a SharePoint Library

Creating a browser-compatible form template


The compatibility setting of a form template can be InfoPath, in which case it will only work in the InfoPath client, or InfoPath and InfoPath Forms Services. This compatiblity setting is made when designing the form template, but can be changed at any point during form template design. To check the compatiblity settings of a form template, use the following steps:


Open Infopath 2007






On right hand side we can add controls to the form




Drag & Drop controls to the form




We added a Text box




1.     On the Tools menu, click Form Options.




2.     Select the Compatibility category.


3.     To make a form template browser-compatible, select the appropriate setting in the Browser compatibility section of the dialog box.


4.     Click OK.




 


You can click Change compatibility settings on the Design Checker task pane to go directly to this category in the Form Options dialog box. The Design Checker task pane and the status bar indicate the form template's current compatiblity setting. For more information about using this task pane, click Help with Design Checker at the bottom of the task pane.


 


In Tools Menu click on Submit Options




Check checkbox "Allow users to submit this form"


Select radio button "Send form data to a single destination"


Select "SharePoint document library" from drop down list


Choose a data connection for submit>Click on Add button


 



Provide Custom List URL  [copy from IE address bar]


We created a custom list called "Infopath Form Results" on http://app


 




Filename format can be selected as shown below. verify it using fx button on right.


If you want to overwrite file with same name check checkbox "Allow overwrite if file exists"


Click Next




We can change the name of data connection


Click Finish



Click Ok on submit options




Publishing a browser-compatible form template


Publishing a browser-compatible form template that does not contain code creates a browser-enabled form template. The form template compatibility setting must be InfoPath and InfoPath Forms Services before it can be published. To publish a browser-compatible form template to a SharePoint library, follow these steps:


1.     On the File menu, click Publish.


 



2.     Select To a SharePoint server with or without InfoPath Forms Services and click Next.




3.     Type the URL location of a server running Office SharePoint Server or InfoPath Forms Services and click Next.





4.     Select Document Library and click Next.




5.     Select Create a new document library and click Next.




6.     Enter a name and optional description for the new document library and click Next.



7.     Select fields from the form template that you wish to display as columns in the document library and click Next.


Click on Add



Select a field to display as column name We selected field1 which is the textbox we added to form


Check Allow users to edit data in this field by using a datasheet or properties page




On warning prompt click OK




After adding all columns Click Next




8.     Click Publish.




9.     Once the form template is published, you can choose to e-mail the location of the form template or open the library in the default Web browser by checking the appropriate boxes.


10.  We checked following option> Open this document library


Click Close.


 



 


By default, when you create a new form in a SharePoint library containing a form template, the form will open in InfoPath if Office InfoPath 2007 is installed on the computer. To see what the browser-enabled form template looks like in the Web browser, follows these steps:




1.     In the newly-created document library, choose Form Library Settings from the Settings menu.




2.     In the General Settings section, click Advanced settings.




3.     Click Display as a Web page in the Browser-enabled Documents section of the Form Library Advanced Settings page.




4.     Click OK.


5.     Click the link near the top of the page to return to the document library.


6.     Click New to open the form in the Web browser.



7.     Form opens in Browser


 



Change data in Text box and click on Submit


 We will get following message "The form was submitted succesfully"




We can check the data submitted in the document library "Infopath1" on SharePoint site.










  Note


Change this setting back to Open in the client application if you prefer users to fill out the form in InfoPath when it is available on the client computer. If Office InfoPath 2007 is not available, users will be able to fill out the browser-enabled version of the form template in a Web browser.


 



If Form prompts with following message Click on Replace Form Template on your computer


 


Form opens in Infopath




Fill the form and click on Submit


Reference :  http://msdn2.microsoft.com/en-us/library/bb250997.aspx


===THANK YOU===

1 comment:

Nidhi said...

NIce one, looking cool with screenshots