A. Steps at client-side (for InfoPath developers)
- Create an InfoPath form and use managed code (C#) as business logic.The business logic needs full trust on the server to run.
- Save your form and publish it to a SharePoint Server with or without InfoPath Forms Services
- If you opt for ‘Document Library’ a library will be created or updated and the template can only be used in this library. If you opt for ‘Site Content Type’, you can use your template in multiple document libraries on several sites. A site content type is nothing more than a type of document with some specific properties.
In this situation you cannot opt to create a document library or a content type because you used managed code. You must select ‘Administrator-approved form template (advanced)’. We need the ‘full trust’ security level to run .NET code.
- We can’t publish the form directly on the Sharepoint Server. First of all we must store the InfoPath form to a location which is accessible for the administrator.
B. Steps at server-side (for administrator)
- Go to Central Administrator > Application Management. Select ‘Manage Form Templates’ in the ‘InfoPath Forms Services’ section.
- Click on ‘Upload Form template’. The admin must browse to the location where the InfoPath form was stored by the developer.
- Open the context menu of the uploaded file in the Form Templates List. Select ‘Activate to a Site collection’. This will publish the InfoPath Form as a Site Content Type to a site collection.
C. Steps at server-side (for site owners)
- Go to the site collection on which you activated the InfoPath form template. Open the list where you want to install the form template.Click on Settings and select ‘Site Settings’. Click on ‘Advanced Settings’ in the ‘General Settings’ section and activate the content type management. (select ‘Yes’)
- Now you will be able to manage the Content Types. Click on ‘Add from existing site content types’ to add the activated Form Template as Site Content in this list.
- Go back to your list and Click on the ‘New’ Button to start a document based the uploaded Form Template.