2
votes

By default MOSS directs browser enabled InfoPath forms to the /_layouts/formserver.aspx page, with the query string parameters that define the form to display or edit. We have defined our own page (for a number of reasons) and would like to direct the forms in the form library there. The page can be hosted in that same _layouts folder, in a document library, it doesn't really matter.

Seems like there should be a linkeage (hopefully in a form of a configuration setting) that tells SharePoint where to direct the forms.

Thanks!

2

2 Answers

2
votes

If you are using the SharePoint lists or form libraries to display the list of forms, you could add a jquery rewrite (in either a Custom Editor Web Part or Master Page) to look for links to the FormServer.aspx link.

<script type="text/javascript" src="~/_layouts/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){

  //Rewrite Form Links to Open in Custom Page
  $("a[href*='/_layouts/FormServer.aspx']").each(function()
  {
     var formFileName = this.href.figureOutWhatFormAndParamsYouNeed()
     var formServerUrl = 'https://server.example.com/_layouts/CustomPage.aspx'
     this.href = formServerUrl
  });
})
</script>
1
votes

Have a look at the ServerFiles in the 12 Hive under 'Template\XML'. This has file extensions and a mapping to a redirect URL.

You can see there is a mapping for XSN and XML files in relation to InfoPath.

I haven't tried this and obviousily the normal caveats apply when altering files in the 12 Hive.