locked
"The form has been closed" error message displayed right after XmlFormView web part added to sharepoint web part page RRS feed

Answers

  • Hi,
    I was running into much of the same issues as you had and was also using this in a Publishing Page. I ran through the similar steps as Eric Harlan.
    1) added the XMLFormView web part
    2) go to web part maintance page (as indicated in Erics post), close the first XMLFormView web part, click "Go back to web part page" link.
    3) On the Page, in Edit Page, add another XMLFormView web part. You will now see the message "Only one XMLFormView web part can be displayed on the page"
    4) From the Web Part Edit menu drop-down, choose Modify Shared Web Part. However, when I did that, I got the "The form has been closed" message on my entire screen. UGH!
    5) My workaround: I navigated to the Pages library where this publishing page is located. From the drop-down menu, I chose "Edit in SharePoint Designer" (note: must have SPD installed). Once I opened the page, SPD prompted me to "Edit in Browser" or "Edit Page Layout" or "Cancel". i chose Edit in Browser. Once the page opened in another browser, I was able to get to the Modify Shared Web part menu. From there I completed the rest of these steps.
    6) Changed Web Part title to "XMLFormViewFinal"
    7) Under Features, changed status to "Editing"
    8) Under Data Binding, added xsnLocation and SaveLocation.
    9) click "Apply" to ensure changes are working, then click "OK"
    10) go back to web part maintenance page and deleted the orginal "XMLFormView" web part. Then click "Go back to web part page" link.

    Kind of a kludgy way to do this, but it worked for me.
    Friday, March 20, 2009 7:20 PM

  • Fenny,

    I ran into this problem also. What worked for me was adding the XMLFormView Web Part in SP Designer to the LAYOUT. I set NO properties on the web part on the layout. Then I create a page that uses this layout.

    This is a layout I often use for pages that need an InfoPath form. So this was a good solution for me.

    My code in SP Designer is something like this



    <
    WebPartPages:WebPartZone id="g_FF74125A36834386BD6FA6A439A12F59" runat="server" title="Zone 1">     
      <ZoneTemplate>    
        <Controls:XmlFormView runat="server" ShowFooter="True" SaveLocation="" XsnLocation=""    
          EditingStatus="Editing" ChromeType="None" XmlLocation="" PrintWindow="False"      
          ID="XmlFormView2" ShowHeader="True" Title="XmlFormView"      
          __MarkupType="vsattributemarkup" __WebPartId="{DF900EB0-1365-4D17-9792-7E768AE1E230}"      
          WebPart="true" __designer:IsClosed="false" partorder="1"/>     
      </ZoneTemplate>    
    </WebPartPages:WebPartZone>    
        
     

    When the page renders, go to the Page menu in the Page Editor toolbar (turn it on through Site Actions if not already visible) and click Modify Web Parts and select your XMLFormView. Then the webpart will render without the Form is Closed message and you can select to Modify Shared Web Part from there to set the XSN or XML location and other properties.


    Hope this helps.

    -Dave
    • Edited by yutzmann Friday, March 20, 2009 7:53 PM incomplete
    • Marked as answer by Mike Walsh FIN Monday, March 23, 2009 6:44 AM
    Friday, March 20, 2009 7:49 PM
  •  Hi,

    Well, I couldn't find any other solutions to display InfoPath Form, indeed.

    But I found something interesting, which we can actually convert InfoPath Form to web page.
    This is the only article I have, http://office.microsoft.com/en-us/sharepointserver/HA102150351033.aspx
    From the pictures in this article, the converted web page might not be a form page.
    By the way, I don't see "Convert Document" from the form template javascript pulled down menu :-|


    Thanks for sharing,
    Fenny
    • Marked as answer by Fenny Chai Monday, April 6, 2009 7:45 AM
    Friday, March 27, 2009 3:36 AM

All replies

  • awesome, i have a video to help you through this.  InfoPath form in a Web Part

    What you will need to do is when you are given the "form has closed" prompt go up to your url bar in your browser and remove anything after "?"  then add in "?contents=1"  this will give you all the web parts that are on the page you are trying to access. You will have to dance around with this method a little to get your desired result.  You will need to "CLOSE" (not delete) the xmlformview web part from the page, then RE ADD it in the same method you did before. Somehow the fact of it being on the page already and adding another one will do away with that "form has closed" prompt. But again you need to dance with it a little to get it to work. Let me know if that helps, i've done this method a hundred times so I can surely help you through this issue.

    Eric

    Eric Harlan | www.ericharlan.com |twitter.com/ericharlan
    • Proposed as answer by EricHarlan Wednesday, March 11, 2009 3:45 PM
    • Unproposed as answer by Mike Walsh FIN Monday, March 23, 2009 6:43 AM
    Wednesday, March 11, 2009 3:45 PM
  • Thanks Eric for sharing your experince.

    I've gone through quite a number of forums/articles/videos for the "form has been closed" issue, all of them basically telling the same method to fix it, and that's definitely doesn't work at my end. :(

    I managed to see following screen after closed the first XmlFormView and re-add the second XmlFormView

        XmlFormView
        -----------------------------------------------------------------------------------------
        Only one XmlFormView Control can be displayed on an aspx page.


    Very disappointed that I hit that error again after select "Modify Shared Web Part" from web part Edit menu.
    I'v repeated these steps for many times, but still no luck for me. :(

    I'm actually working on a publishing site, when creating a page, I have to go to Site Actions -> Create Page, then from there to select a Page Layout for this new page, for sure this selected Page Layout contains web part zone.
    By the way, I realized there is another way to create new page, which is from Siste Actions -> View All Site Contents, from there click "Create" and then select "Web Part Page"
    Does this make any different? Why the "Page" library is not listed in the Save Location dropdown list?


    Thanks for sharing,
    Fenny
    • Proposed as answer by beargal34 Friday, March 20, 2009 6:49 PM
    • Unproposed as answer by Mike Walsh FIN Monday, March 23, 2009 6:44 AM
    Thursday, March 12, 2009 1:52 AM
  • Hi,
    I was running into much of the same issues as you had and was also using this in a Publishing Page. I ran through the similar steps as Eric Harlan.
    1) added the XMLFormView web part
    2) go to web part maintance page (as indicated in Erics post), close the first XMLFormView web part, click "Go back to web part page" link.
    3) On the Page, in Edit Page, add another XMLFormView web part. You will now see the message "Only one XMLFormView web part can be displayed on the page"
    4) From the Web Part Edit menu drop-down, choose Modify Shared Web Part. However, when I did that, I got the "The form has been closed" message on my entire screen. UGH!
    5) My workaround: I navigated to the Pages library where this publishing page is located. From the drop-down menu, I chose "Edit in SharePoint Designer" (note: must have SPD installed). Once I opened the page, SPD prompted me to "Edit in Browser" or "Edit Page Layout" or "Cancel". i chose Edit in Browser. Once the page opened in another browser, I was able to get to the Modify Shared Web part menu. From there I completed the rest of these steps.
    6) Changed Web Part title to "XMLFormViewFinal"
    7) Under Features, changed status to "Editing"
    8) Under Data Binding, added xsnLocation and SaveLocation.
    9) click "Apply" to ensure changes are working, then click "OK"
    10) go back to web part maintenance page and deleted the orginal "XMLFormView" web part. Then click "Go back to web part page" link.

    Kind of a kludgy way to do this, but it worked for me.
    Friday, March 20, 2009 7:20 PM

  • Fenny,

    I ran into this problem also. What worked for me was adding the XMLFormView Web Part in SP Designer to the LAYOUT. I set NO properties on the web part on the layout. Then I create a page that uses this layout.

    This is a layout I often use for pages that need an InfoPath form. So this was a good solution for me.

    My code in SP Designer is something like this



    <
    WebPartPages:WebPartZone id="g_FF74125A36834386BD6FA6A439A12F59" runat="server" title="Zone 1">     
      <ZoneTemplate>    
        <Controls:XmlFormView runat="server" ShowFooter="True" SaveLocation="" XsnLocation=""    
          EditingStatus="Editing" ChromeType="None" XmlLocation="" PrintWindow="False"      
          ID="XmlFormView2" ShowHeader="True" Title="XmlFormView"      
          __MarkupType="vsattributemarkup" __WebPartId="{DF900EB0-1365-4D17-9792-7E768AE1E230}"      
          WebPart="true" __designer:IsClosed="false" partorder="1"/>     
      </ZoneTemplate>    
    </WebPartPages:WebPartZone>    
        
     

    When the page renders, go to the Page menu in the Page Editor toolbar (turn it on through Site Actions if not already visible) and click Modify Web Parts and select your XMLFormView. Then the webpart will render without the Form is Closed message and you can select to Modify Shared Web Part from there to set the XSN or XML location and other properties.


    Hope this helps.

    -Dave
    • Edited by yutzmann Friday, March 20, 2009 7:53 PM incomplete
    • Marked as answer by Mike Walsh FIN Monday, March 23, 2009 6:44 AM
    Friday, March 20, 2009 7:49 PM
  • Hi all,

    I'm very appreciate all solutions from you guys :-)
    Now the problem is fixed.
    You make my days!! ;-)

    By the way, other than using XmlFormView web part, is there any other idea/webpart that can be used to display InfoPath form?



    Thanks for sharing,
    Fenny

    Tuesday, March 24, 2009 2:23 AM
  • Hi Fenny,
    Sorry, I don't have any other ideas than the XMLFormView web part. If you do try something else, please post. I'd be curious to hear other suggestions.

    Thanks,
    beargal34
    Thursday, March 26, 2009 2:28 PM
  •  Hi,

    Well, I couldn't find any other solutions to display InfoPath Form, indeed.

    But I found something interesting, which we can actually convert InfoPath Form to web page.
    This is the only article I have, http://office.microsoft.com/en-us/sharepointserver/HA102150351033.aspx
    From the pictures in this article, the converted web page might not be a form page.
    By the way, I don't see "Convert Document" from the form template javascript pulled down menu :-|


    Thanks for sharing,
    Fenny
    • Marked as answer by Fenny Chai Monday, April 6, 2009 7:45 AM
    Friday, March 27, 2009 3:36 AM