Hi everyone,
I'm trying to build a series of InfoPath 2007 forms (Forms Services) for SharePoint. The problem is that although these can be deployed centrally to the site collection, there is a problem with saving the forms. What we are doing is building a custom site definition that will create N number of subsites. These subsites are using form/document libraries with content types that are based off the deployed forms. Oddly enough this all works great, except:
We want the forms to save locally in the local subsite library from which the content type is used. I have traditionally used a submit button tied to a data connection (UDCX or hardcoded, doesn't matter) to tell the form where to save itself. Obviously this is a problem because the location in which the form was instantiated determines where it should be saved. So, I decided to used a custom data connection in the local sharepoint subistes that each form should be able to look at relative to it's own location and that UDCX could be customized when the subsite was created.
This seems to work too, except I didn't realize that forms server creates its instance of the form from the central library in which it is stored. This means that it can't look and find the UDCX file local to it's subsite.
So I took a different path and tried to deploy the forms as part of a feature with the local subsite site definition and then would build the content types locally. It turns out I can't get the forms to be browser enabled without deploying it the way SharePoint wants (using the Microsoft.Office.InfoPath.Server.Administration.XsnFeatureReceiver class) referenced in this article: http://blah.winsmarts.com/2008-8-Deploying_InfoPath_2007_Forms_to_Forms_Server_-and-ndash_Properly.aspx So although I can deploy them to subsites like this, they won't load in a browser unless they are activaetd via that FeatureReceiver. Oh yeah, and that class won't let you deploy to an SPWeb object, only SPSite. So I was back to square one.
I hope all this made sense, but now I'm trying to find a way to re-use forms across many sub-sites and tell those forms to save in the location from which they were originated (library). I'm more an expert at SharePoint than I am at InfoPath, so I'm hoping that there is some coding enabled in browser forms or ways to dynamically tell forms server how to save/submit to a data connection.
Thank you for any help you can provide!
-Ryan Thomas