Source code for InfoPath 2007 form

I inherited a SharePoint site with an InfoPath 2007 form. I was able to download the form .xsn file. I see there is a lot of logic in the logic viewer. How do I obtain the source code project for the form. Is this project compiled once the form is published?
wn411Asked:
Who is Participating?
 
livanescuCommented:
open in an xml editor the xsf file extracted from the xsn.
all the information is stored here in xml format (typical for xml!):
 - xsf:package is a list of all the files included
 - xsf:extensions contains details about offline-capabilities, views restrictions and sharepoint form library associations
 -xsf:views includes details on each view of the form (same data displayed in various ways - these views are the .xsl files in the package); the details are buttons (unbound controls), optional sections (xml fragments added at runtime), special handling of text fields (such as proofing, multiline etc), context menus (actions such as adding, removing optional sections) and print settings
- xsf:ruleSets describes rules that you've seen in the logic window
- xsf:dataObjects identifies external and internal  data connections
- xsf:domEventHandlers is identifying the field which value change will represents an event that will trigger the execution of a certain ruleSet
- xsf:customValidations contains the list of conditional validations generating errors
- xsf:calculations will provide you with the list of fields that have values calculated at runtime
- xsf:listProperties describes the  promoted fields and their association with SharePoint form library columns
 - xsf:dataAdapters will give a list of submission methods used

Detailed definition (with some errors):
infoPath XSF Core Schema Diagram
http://msdn.microsoft.com/en-us/library/bb230362(v=office.12).aspx

InfoPath 2010 Dev reference (downloadable file)
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=15161
0
 
Clay FoxDirector of Business IntegrationCommented:
If you open in design mode, you can edit the logic, the layout, and potentially the code. In options you can see the type of code it uses.  If managed code you can use visual studio, if java or vbscript you can use the standard editor.

You can also export source files to be able to open the component files in notepad and see the XML.

The xsn file is essentially a cab file of all of the XML, XSL, manifest, components of the form solution.

When you publish, it repacks them all together and sets the location where they are hosted.
0
 
wn411Author Commented:
Yes I opened it in design mode. But I do not see any VB or C# code in a project. I also checked rules. The only thing I see is in the logic window.

I also save the components of the XSN using the File Menu. I looked at all the XML etc. But I did not see any code.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
wn411Author Commented:
Thanks. Would this include any C# or VB Code if that was used in the form?
0
 
livanescuCommented:
xsf: script will tell you what was the script language set - if any - and the script file; look for .js, .dll and .exe in the list of files (js is JavaScript - typical for IP2003; dll/exe will probably define a Visual Studio project - typical for IP2007/2010); if none, there is a distinct possiblity that no code was ever created.

InfoPath can emulate/implement business logic with zero code. Which is practically one of its'  main strengths.
0
 
wn411Author Commented:
Right, I just want to confirm that there is not a way I can get the source code if the original developer used C# or VB. In that case, I will make the case that we need to get the source code from the developer.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.