Posts Tagged ‘InfoPath Form Services’

Data Connections Cause “The form has been closed” Error

August 22, 2008

The dreaded “Form is closed” error… something is wrong with your form, and there is very little information as to what it might be.  Or how to fix it.  This is an interesting one I came across today.  I have a simple InfoPath form with four data connections that connect to SharePoint lists on my site.  When the first page with data connections tries to load, I get the usual generic error message:

followed by the evil “The form has been closed.” error.  Ugh.

The event log had the following entry:

Event Type: Warning
Event Source: Office SharePoint Server
Event Category: Forms Services Runtime
Event ID: 5368
Date:  22/08/2008
Time:  4:04:38 PM
User:  N/A
Computer: <deleted>

Exception occurred during request processing. (User: <deleted>, Form Name: , IP: , Request: <deleted>, Form ID: , Type: XmlException, Exception Message: Unexpected end of file has occurred. The following elements are not closed: dfs:dataFields, dfs:myFields. Line 1, position 306.)

For more information, see Help and Support Center at

Turns out one of my SharePoint lists had an entry with a forward-slash (/) in it.  Looks like InfoPath might not be HTML-encoding/escaping/checking this text, so it killed the Xml and thus broke my form.  I fixed up the slash entry and the form loads just fine.  So beware the forward-slash!