Creating InfoPath Form Templates That Work With InfoPath Forms Services

Browser-compatible forms deployed to Microsoft SharePoint Server 2013 with InfoPath Forms Services support features and controls that cover the majority of InfoPath form usage scenarios. However, browser-compatible forms delivered by InfoPath Forms Services do not support all InfoPath features. Some features and controls are not implemented on the server. Other features do not have a meaningful representation on the server.

The sections that follow specify which features are supported in browser-compatible forms, which features cannot be used in browser-compatible forms, and which features can be specified for browser-compatible forms, but will not function in a Web browser.

Features Supported by Both InfoPath and InfoPath Forms Services

The following sections list the features that are supported by browser-compatible form templates deployed to InfoPath Forms Services that can open in both InfoPath and the browser.

Controls

The following controls are supported in form templates that can be opened both in InfoPath and the browser.

  • Text Box

  • Rich Text Box (only editable in Microsoft Internet Explorer)

  • Drop-Down List Box

  • List Box

  • Date Picker (Rendered as a text box on browsers other than Internet Explorer)

  • Check Box

  • Option Button

  • Button

  • Section

  • Optional Section

  • Repeating Section

  • Repeating Table

  • File Attachment

  • Hyperlink

  • Expression Box

  • Combo Box

  • Multiple-Selection List Box

  • Bulleted List

  • Numbered List

  • Plain List

  • Picture

  • Choice Group

  • Choice Section

  • People/Group Picker

  • External Item Picker

  • Picture Button

  • Calculated Value

Declarative Features

Other declarative features that work in both InfoPath and the browser:

  • Rules

  • Calculations

  • Validation

Note

Simple rules, calculations, and data validation are enabled and run in the browser using JScript. Complex rules, calculations, and data validation require a postback to perform these operations on the server.

Code

Business logic code must be based on the InfoPath managed code object model provided by the Microsoft.Office.InfoPath namespace. Business logic code running on the server is subject to the following restrictions:

  • Because each server request may be handled by a different front end and because InfoPath Forms Services will load only one instance of the business logic, programmers cannot rely on data stored in global or static variables. To accommodate this, business logic must store state into a property bag, access to which is provided by the FormState property.

  • A subset of the members of the Microsoft.Office.InfoPath namespace provide features, such as Information Rights Management (IRM), that are not supported on the server. For more information on which object model members are and are not supported, see the "Object Model Members that Work in InfoPath and InfoPath Forms Services" and "Object Model Members that Work Only in InfoPath" sections later in this topic.

  • Business logic written in VBScript, JScript, and the InfoPath 2003-compatible object model provided by members of the Microsoft.Office.Interop.InfoPath.SemiTrust namespace is not supported on the server.

Features Not Supported by InfoPath Forms Services

The following sections list the features that are not supported by browser-compatible form templates deployed to InfoPath Forms Services that can open in both InfoPath and the browser.

When using the Design Checker feature in InfoPath design mode to confirm compatibility with InfoPath Forms Services, features that are not supported will produce either errors or messages. Features that produce errors will prevent the form template from being published as a browser-enabled form. Features that produce messages are allowed, but that particular feature will not run when the form is opened in a browser.

Controls

The following controls and control features are not supported in form templates that can be opened both InfoPath and the browser.

  • Filters on repeating controls

  • Master/Detail

  • Vertical Label

  • Horizontal Repeating Table

  • Ink Picture

  • Repeating Recursive Section

Other Features That are Not Supported or Not Fully Supported by InfoPath Forms Services

Other features that are not supported on InfoPath Forms Services:

  • ActiveX Controls

  • HTML Taskpanes

  • Placeholder text in controls. For example, "Click here to enter text" (no text is shown in the browser)

  • Database data connections are limited to read-only access to SQL server databases

  • User roles

  • Digital signature extensibility through the object model. Digitally signing on the server is supported through an ActiveX control which runs only in Microsoft Internet Explorer.

  • Human Workflow Services (HWS) integration. HWS has been deprecated by BizTalk server

  • XML Schema error message overrides. This is a rarely used feature which allows the form designer to provide a different message than the one provided by MSXML or System.Xml when a document doesn't validate (generally because of a type mismatch). This feature is not supported in the designer user interface and requires hand editing of the form definition (.xsf) file.

Features with No Direct Parallel on the InfoPath Forms Services

Other features that are not supported on InfoPath Forms Services:

  • Pop-up dialogs during modeless validation

  • Outlook Integration

  • COM Add-Ins

  • Merge Forms

  • Auto-Save, Crash Detection and Recovery

  • Mail Envelope

  • Export to Excel

  • Tablet / Ink Features including Ink Picture control

  • Undo / Redo

  • Information Rights Management (IRM)

  • Modal dialogs from business logic

  • XSLT extensibility (xd:preserve blocks)

  • External automation

  • Offline query caching

  • Spell-checking

  • Restricted security mode

Note

These features do not produce any error or message notifications when using the Design Checker feature in InfoPath design mode.

Object Model Members that Work in Both InfoPath and InfoPath Forms Services

InfoPath provides a new managed-code object model with a core set of functionality for creating custom business logic in form templates. When deployed to SharePoint Server 2010 with InfoPath Forms Services, business logic created using this new object model will run in both a Web browser and in InfoPath. Optionally, you can write business logic that uses an additional level of functionality available from this object model that will run only in form templates opened for editing in InfoPath.

To write business logic that will run when a form is opened in both a Web browser and in InfoPath, select the Enable browser-compatible features only check box on the Design a Form Template dialog box when creating a new form template. To write business logic that can use additional functionality only when opened in InfoPath, clear the Enable browser-compatible features only check box when creating a new form template. You can also change this setting after creating a form template, by clicking Change Compatibility Settings on the Design Checker task pane, and then selecting or clearing the Design a form template that can be opened in a browser or InfoPath check box. If you choose to create a browser-compatible form template, the compiler will display an error if you have used any classes or members that are not compatible with InfoPath Forms Services.

Note

After publishing a browser-enabled form template that contains managed code to SharePoint Server 2010 with InfoPath Forms Services, or to a shared location, the form template must be uploaded and approved by a server administrator before it will be allowed to run.

The following classes and members of the InfoPath managed code object model provided by the Microsoft.Office.InfoPath namespace are supported in both InfoPath and InfoPath Forms Services.

Parent Class Members
AdoQueryConnection
BuildSqlFromXmlNodes
Command
Connection
Timeout
BuildSqlFromXmlNodes
Command
Connection
Timeout
Application
Environment
Name
User
ButtonEvent
Clicked
ClickedEventArgs
ControlId
Source
ControlEvents
Item
DataConnection
Execute
Name
DataConnectionCollection
Count
GetEnumerator
Item
Item
DataSource
CreateNavigator
GetNamedNodeProperty
Name
QueryConnection
ReadOnly
SetNamedNodeProperty
DataSourceCollection
Count
GetEnumerator
Item
Item
EmailAttachmentType
None
Xml
XmlXsn
EmailSubmitConnection
AttachmentFileName
Bcc
CC
EmailAttachmentType
Execute
Introduction
Subject
To
Environment
IsBrowser
IsMobile
EventManager
ControlEvents
FormEvents
XmlEvents
FileQueryConnection
Execute
FileLocation
FileSubmitConnection
Execute
Filename
FolderUrl
FormError
DetailedMessage
FormErrorType
Message
Name
Site
FormErrorCollection
Add
Add
Count
Delete
Delete
DeleteAll
GetEnumerator
GetErrors
GetErrors
Item
FormErrorType
SchemaValidation
SystemGenerated
UserDefined
FormEvents
Loading
Submit
VersionUpgrade
ViewSwitched
FormTemplate
Manifest
OpenFileFromPackage
Uri
Version
LoadingEventArgs
CancelableArgs
InputParameters
SetDefaultView
SetDefaultView
SharepointListQueryConnection
Execute
QueryThisFormOnly
SiteUrl
SubmitEventArgs
CancelableArgs
User
LoginName
UserName
VersionUpgradeEventArgs
CancelableArgs
DocumentVersion
FormTemplateVersion
View
ViewInfo
ViewInfo
Caption
Name
ViewInfoCollection
Count
Default
GetEnumerator
Initial
Item
Item
SwitchView
SwitchView
WebServiceConnection
Execute
GenerateDataSetDiffGram
ServiceUrl
SoapAction
Timeout
WsdlUrl
XmlEvent
Changed
RaiseUndoRedoForChanged
Validating
XmlEventArgs
Match
NewValue
OldParent
OldValue
Operation
Site
UndoRedo
XmlEvents
Item
Item
XmlForm
CurrentView
DataConnections
DataSources
Errors
FormState
MainDataSource
NamespaceManager
New
NotifyHost
QueryDataConnection
ReadOnly
Signed
Submit
Template
Uri
ViewInfos
XmlLang
XmlFormCancelEventArgs
Message
MessageDetails
XmlOperation
Delete
Insert
None
ValueChange
XmlValidatingEventArgs
ReportError
ReportError
ReportError
XPathTypedValue
Evaluate
SetStringValue
ToString
XPath

Object Model Members that Work Only in InfoPath

The following classes and members of the InfoPath managed code object model provided by the Microsoft.Office.InfoPath namespace are supported only in InfoPath.

Note

These object model members can be used in the code of a browser-enabled form template, if you write conditional logic that determines whether the form is opened in the browser or InfoPath . For more information, see Write Conditional Logic That Determines the Run-time Environment.

Parent Class Members
ActionType
Copy
Cut
Delete
Paste
XCollectionInsert
XCollectionInsertAfter
XCollectionInsertBefore
XCollectionRefreshFilter
XCollectionRemove
XCollectionRemoveAll
XFileAttachmentAttach
XFileAttachmentOpen
XFileAttachmentRemove
XFileAttachmentSaveAs
XOptionalInsert
XOptionalRemove
XReplaceReplace
Application
ActiveWindow
CacheFormTemplate
ComAddIns
GetFormTemplateLocation
IsDestinationReachable
LanguageSettings
MachineOnlineState
Quit
Quit
RegisterFormTemplate
RegisterFormTemplate
UnregisterFormTemplate
UsableHeight
UsableWidth
Version
Windows
XmlForms
Certificate
ExpirationDate
IssuedBy
IssuedTo
Status
CertificateStatus
Error
Expired
NotTrusted
Revoked
Valid
ContextChangedEventArgs
ChangeType
Context
UndoRedo
ErrorMode
Modal
Modeless
ExportFormat
Mht
Pdf
Xps
FormError
ErrorCode
FormErrorCollection
Add
Add
FormEvents
ContextChanged
Merge
Save
Sign
FormTemplate
CacheId
HtmlTaskPane
HtmlDocument
HtmlWindow
Navigate
MachineState
IEInOfflineState
Offline
Online
MailEnvelope
Available
Bcc
CC
EmailAttachmentType
Introduction
Subject
To
Visible
MergeEventArgs
CancelableArgs
Count
Index
Rollback
Xml
Permission
ApplyPolicy
DocumentAuthor
Enabled
PermissionFromPolicy
PolicyDescription
PolicyName
RequestPermissionUrl
StoreLicenses
UserPermissions
PermissionType
Change
Edit
Extract
FullControl
ObjectModel
Print
Read
Save
View
SaveEventArgs
CancelableArgs
CloseIfSaveCancelled
Filename
IsSaveAs
PerformSaveOperation
Signature
Certificate
Comment
Sign
SignatureBlockXmlNode
Status
SignatureCollection
Count
CreateSignature
GetEnumerator
Item
SignatureRelation
Cosign
CounterSign
Single
SignatureStatus
Error
Invalid
Unsupported
Valid
SignedDataBlock
Caption
Name
Sign
SignatureContainer
SignatureRelation
Signatures
XPath
SignedDataBlockCollection
Count
GetEnumerator
Item
ShowSignatureDialog
SignEventArgs
SignatureWizard
SignedDataBlock
TaskPane
TaskPaneType
Visible
TaskPaneCollection
Count
GetEnumerator
Item
Item
TaskPaneType
BulletsNumbering
ClipArt
Find
Formatting
Html
ParagraphFormatting
Replace
Spelling
User
IsUserMemberOf
UserPermission
ExpirationDate
Permission
Remove
UserId
UserPermissionCollection
Add
Add
Add
Add
Count
GetEnumerator
Item
Item
Remove
RemoveAll
View
DisableAutoUpdate
EnableAutoUpdate
ExecuteAction
ExecuteAction
Export
ForceUpdate
GetContextNodes
GetContextNodes
GetSelectedNodes
SelectNodes
SelectNodes
SelectNodes
SelectText
SelectText
ShowMailItem
Window
ViewInfo
HideName
Window
Activate
Active
Caption
Close
Close
CommandBars
Height
Left
MailEnvelope
TaskPanes
Top
Width
WindowState
WindowType
XmlForm
WindowCollection
Count
GetEnumerator
Item
WindowState
Maximized
Minimized
Normal
WindowType
Designer
Editor
XmlChangingEventArgs
CancelableArgs
XmlEvent
Changing
XmlForm
Close
Dirty
Extension
GetWorkflowTasks
GetWorkflowTemplates
Host
Hosted
HostName
MergeForm
MergeForm
Permission
Print
Print
Recovered
Save
SaveAs
SetSaveAsDialogFilename
SetSaveAsDialogLocation
SignedDataBlocks
TaskPanes
UserRole
XmlFormCollection
Count
XmlFormCollection
GetEnumerator
Item
New
New
NewFromFormTemplate
NewFromFormTemplate
NewFromFormTemplate
NewFromFormTemplate
Open
Open
XmlFormOpenMode
XmlFormOpenMode.Default
XmlFormOpenMode.FailOnVersionMismatch
XmlFormOpenMode.FailOnVersionOlder
XmlFormOpenMode.IgnoreDataConnectionsFailure
XmlFormOpenMode.PromptIfSigned
XmlFormOpenMode.ReadOnly
XmlFormOpenMode.TransformEvenIfSigned
XmlFormOpenMode.UseExistingVersion
XmlFormOpenMode.UseFileConverter
XmlValidatingEventArgs
ReportError