InfoPath Forms – Minimize and Maximize Sections or Collapsible Sections

9 07 2008

There’s a cool article here describing a nice way to achieve expanding or collapsible sections in InfoPath Forms.





Publishing Infopath To SharePoint: “the following url is not valid” Error

2 07 2008

While attempting to publish an Infopath form to a Sharepoint site collection, I came across the following error:

"The following URL is invalid: http://{the-url}"

This had me stumped for a couple of hours, digging around Central Admin messing with security settings etc. Finally I googled the problem and found nothing of particular use untill I came across this post by fellow WordPresser Marcello Tonarelli.

Turns out that to publish in Infopath you need a site at the root of the webapplication containing the site collection you’re publishing to….which someone here deleted without mentioning it :-(





Clear the InfoPath 2007 local form template cache

7 02 2008

When loading an InfoPath form from an intranet/Sharepoint etc, the form template is downloaded and cached locally. Sometimes after the template has been upgraded on the server the local client doesn’t always get the upgraded form template but uses the local cached copy instead.

You can rectify this by clearing the local cache;

Infopath /cache clearall

Verify that the cache has been cleared by navigating to the following folder for XP+

C:\Documents and Settings\[User]\Local Settings\Application Data\Microsoft\InfoPath\FormCache2

Or for Vista;

C:\Users\[User]\AppData\Local\Microsoft\InfoPath\FormCache2

Underneath the FormCache2 folder there will be a folder with a GUID name, check inside here, it should be empty, apart from a file called _SCVer.dat.





Deploy an InfoPath 2007 Form with Managed Code to a Browser Enabled Sharepoint Document Library

17 12 2007

InfoPath forms can be deployed to a Sharepoint document library, and assuming that the form template has been developed to be browser compatible, the form can be opened in a browser client (either when the user’s machine doesn’t have the InfoPath client or when the Sharepoint document library is configured to open forms by browser only).

Such form templates can usually be published directly to a Sharepoint document library without Administrator intervention, however, when the form template contains managed code the form cannot be published directly to the Sharepoint document library, but has to be first Approved by the Sharepoint Administrator.

The Administrator has to approve the template, upload it and then activate it against 1 or more site collections.

The process begins be publishing the form template as usual, at the screen shown below, select “Enable this form to be filled out using a Browser” and select “Administrator Approved form template”

image

Continue the publish procedure as normal, except that you will be publishing to a network share (or other location) accessible to the Sharepoint Administrator who can then review the form template and approve it.

The Sharepoint Administrator must then;

  1. Upload the template to Sharepoint
  2. Activate it against site collection(s)
  3. Associate the form template with a form library

To Upload the template;

  1. Go to Central Administration for your farm
  2. Select Application Management, from there select InfoPath Forms Services, and then choose Manage Form Templates.
  3. The Form Template library is opened, which is where administrator approved templates for the farm are stored.
  4. Select “Upload Form Template”. Locate and select the saved template file and click the Verify button. You will be shown any errors or warnings related to your template (review them if necessary), and click OK.
  5. Locate your form template again. The Upgrade options exist for you to choose how to upgrade the form template if it already exists.
  6. Click the Upload button to perform the form template upload. It is now available as a Feature to be activated against any site collection in the farm.

To Activate the form template on a Site Collection;

  1. You can activate the form template feature from the Manage Form Templates page of Central Administration, the same page where we just uploaded the template. From the templates context menu, choose Activate to a Site Collection.
  2. In the Location section of the page, choose the relevant Site Collection and click the OK button.

Note, that you may have to change the Web Application location in order to find the right site collection.

To Associate the Form Template with a Form Library;

  1. Create a new form library or use an existing one
  2. Select the library’s advanced settings page and configure the library to allow content-type management
  3. Optionally, you might want to select the “Display as Web-Page” setting
  4. Click OK
  5. From the Content Types section, select “Add from existing site content types”, from the list box displayed locate your form template, click Add then click OK.

If you return to your form library and select New from the library menu, you should see an option there for your form template. If you choose this new option, the form template should be opened in the browser.





Load InfoPath Forms with Managed Code from Sharepoint

17 12 2007

When loading an InfoPath form from a Sharepoint document library, you may be presented with a policy error message indicating that (Internet) forms with managed code cannot be loaded.

This can be a pain in the neck while developing, but can be circumvented by making the following registry change;

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\InfoPath\Security:RunManagedCodeFromInternet(DWORD) = 1