Compartilhar via


Fill out an Infopath form from a link on another page

I develop and manage an internal portal based on Sharepoint for our team. One of the form libraries uses data published via InfoPath Forms. My users requested that they be able to launch the Infopath form without really going to the form library, but rather from a link on another page that they frequented. I found Westin's blog useful to address the issue : https://weblogs.asp.net/wkriebel/archive/2004/09/20/231972.aspx. Eventually, I used Ian Morrish's solution documented at https://www.wssdemo.com/StaffPurchase/default.aspx

From Ian's demo, I used this script in a Content Editor WebPart, and it worked like a charm. Thanks Ian :):

<script src="/_layouts/1033/ows.js"></script>
<script>
function WPQ3createNewDocument()
{
var strTemplate = "https://servername/folder/Forms/template.xsn";
var strSaveLocation = "https://servername/folder";
var strProgID = "SharePoint.OpenXMLDocuments";
createNewDocumentWithProgID(escapeProperlyCore(strTemplate, true), makeAbsUrl(strSaveLocation), strProgID, true);
}
</script>

<a href="" onclick="WPQ3createNewDocument()">Create new order</a>

Comments

  • Anonymous
    August 23, 2006
    It seems like I have covered this once before but I can find it in my archivesnotes.&amp;nbsp; So here it...
  • Anonymous
    October 08, 2006
    Just wanted to say thanks! It's been over a year since you posted that solution and people like me are still making good use of it! I managed to incorporate it into my site quite well so I'm rather happy. :)Cheers!