locked
Infopath Filler Forms - confusion about SharePoint behavior RRS feed

  • Question

  • Thanks for looking at this.

    I was helping a friend (my wife--does that make her a FWB?) with a question and was hoping someone could explain what I am missing as I am stuck. I'm relatively new to sharepoint/infopath and there is a bit of a learning curve:-)

    What she would like to do is place a link (or button) on a user landing page allowing the user to create a new copy of Form X (and submit through a button on the Form). Form X is an Infopath Filler Form.

    The form's functionality works fine from the Add Document link in the SharePoint Form X library. 

    We created a web parts page as the basis for the landing page and looked for a web part to do this.  Apparently, nothing oob.  So then we tried adding the webpart generated for the Form X library with the idea of modifying its view/appearance.

    However, the "add new item" for the webpart gives an upload control rather than opening the new form in  infopath --- as is the behavior from inside the library.  BTW, clicking existing documents gives the expected behavior -- opening them in infopath.

    1) is this the correct behavior for the library webpart?  Or are we simple missing a setting?

    2) Is there a simple way to add a button/link to make it simple for a user to create a new form without being inside the library?

    BTW -- I am set up with Infopath 2010/SharePoint 2010 but her production environment is InfoPath 2007/SharePoint 2010, if it makes a difference.

    Thanks to all again

    -glenn

    Tuesday, February 21, 2012 3:41 PM

Answers

  • Hi ,

    When add a document on the All Items page of the form library ,the link points to the add new item page. But when you add the form library in a data view web part ,the Add Document link points to the Upload page .You can get the href for the links using the F12 development Tool in IE .

    You can add a content query web part on the landing page to hold a button and open the form in InfoPath .Here are the detailed steps:

    1. Open the landing page in browser and choose Site Actions>Edit Page  .
    2. Add a content editor web part on the page .Click in the web part and choose HTML source in the ribbon to add the HTML source .
    3. Add these code in the window .

    <script type="text/vbscript" language="vbscript"> 

    Dim urlLibrary 

    Dim urlTemplate 

    urlLibrary = "http://servername/libraryname/Forms"

    urlTemplate = urlLibrary + "/template.xsn"

    Sub CreateNewInfoPathDocument 

    dim objOpenXMLDocuments 

    set objOpenXMLDocuments = Createobject("SharePoint.OpenXMLDocuments") 

    objOpenXMLDocuments.CreateNewDocument2 window, urlTemplate, urlLibrary 

    End Sub 

    </script> 

    <button onclick="CreateNewInfoPathDocument()">Create New</button>

    You need to change the urlLibrary and urlTemplate  .

    For more information ,please refer to this site:

    Open InfoPath form on button click: http://social.msdn.microsoft.com/Forums/da-DK/sharepointinfopath/thread/6238420f-48bc-4e5a-9c58-9b0451a4e6f2

    Thanks

    Entan Ming

    TechNet Community Support


    • Edited by Entan Ming Thursday, February 23, 2012 6:10 AM
    • Marked as answer by Entan Ming Thursday, March 1, 2012 11:30 AM
    Thursday, February 23, 2012 3:12 AM