Archive | infopath RSS feed for this archive

InfoPath Rules,Validation, Conditional formatting,Code Behind- a sample application for timesheet-part2

Okay from the last post we saw that we could open code behind and saw VSTA opening up from the code location you know J Before we deep dive into doing InfoPath Code behind go through my last post which explains how to deploy , develop and debug infopath forms with code behind deployed as […]

Deploying browser-enabled InfoPath form with code behind i.e. .DLL as content type

Deploying an InfoPath form with code behind i.e. dll as site content type and making the debugging experience for a developer seamless. First of all let me link a nice post by Sahil Malik for deploying InfoPath forms as content types here Let’s create a regular SharePoint feature to deploy an InfoPath form with its […]

InfoPath get/set form fields value in code behind

It would be very common for someone working on InfoPath code behind to retrieve values and set values on the form using code. Below are the snippet for both in C#. /// <summary> /// Sets the field value of an InfoPath Form. pass isNil true for date fields /// </summary> /// <param name="xPath">copy the xpath […]

InfoPath Rules,Validation, Conditional formatting,Code Behind- a sample application for timesheet-part1

Let’s do a very basic timesheet application. Design an InfoPath form as below to enter the hours: Create an xml file from Visual Studio for the tasks dropdown as secondary data source And paste the contents below the xml node created by VS: <tasks> <task> <type>SharePoint Development</type> <value>SharePoint Development</value> </task> <task> <type>SharePoint Designer</type> <value>SharePoint Designer</value> […]

Modify fields of an InfoPath Form Programmatically

1: const string _InfoPathTemplateLocation = @”http://moss2007/ctype/myFormLibrary/FormServerTemplates/myForm.xsn&#8221;; 2: const string _InfoPathPI_mso_infoPathSolution = “name=”urn:schemas-microsoft-com:office:infopath:myForm:-myXSD-2008-08-07T17-35-58″ solutionVersion=”″ productVersion=”″ PIVersion=”″ href=”” 3: + _InfoPathTemplateLocation + “””; 4: const string _InfoPathPI_mso_application = “progid=”InfoPath.Document” versionProgid=”InfoPath.Document.2″ />”; 5: const string _InfoPathPI_mso_infoPath_file_attachment_present = “”; 6:  7: private void createmyForm() 8: { 9:  10: MemoryStream msSr = new MemoryStream(); 11:  12: xmlTextWriter = new XmlTextWriter(msSr, […]