The ShiSh List

fueled with curiosity, enthused by discovery

Fill out an Infopath form from a link on another page

Fill out an Infopath form from a link on another page

  • Comments 2

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>

Leave a Comment
  • Please add 1 and 3 and type the answer here:
  • Post
  • It seems like I have covered this once before but I can find it in my archives\notes.&amp;nbsp; So here it...
  • 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!
Page 1 of 1 (2 items)