Welcome to MSDN Blogs Sign in | Join | Help

The ShiSh List

Solutions for empowering people in the Retail and Hospitality Industry

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 : http://weblogs.asp.net/wkriebel/archive/2004/09/20/231972.aspx. Eventually, I used Ian Morrish's solution documented at http://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 = "
http://servername/folder/Forms/template.xsn";
var strSaveLocation = "
http://servername/folder";
var strProgID = "SharePoint.OpenXMLDocuments";
createNewDocumentWithProgID(escapeProperlyCore(strTemplate, true), makeAbsUrl(strSaveLocation), strProgID, true);
}
</script>
 
<a href="" onclick="WPQ3createNewDocument()">Create new order</
a>

Published Tuesday, August 23, 2005 12:45 PM by shishirs

Filed under:

Comments

# Create New Docs in Doc Library @ Wednesday, August 23, 2006 11:11 AM

It seems like I have covered this once before but I can find it in my archives\notes.&amp;nbsp; So here it...

SharePoint from Scratch

# re: Fill out an Infopath form from a link on another page @ Sunday, October 08, 2006 9:45 PM

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!

mikeman

Anonymous comments are disabled
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker