Friday, November 16, 2007

Anonymous InfoPath Forms

So, you're using MOSS and see that it supports Web enabled Infopath forms.. Sweet, a feature that should have been there from the beginning, since InfoPath is useless without it.

If you've thought about using InfoPath, then you've also realized that every user has to have Infopath, and guess what? It doesnt' come with MS Office unless you pay for the super version.

So, how about anonymous infopath forms? You may have seen a few posts around the web about how to do it, but in reality, you can't. And here's the reason:

Infopath uses a forms library to store forms, and they work the same as a document library. Document libraries do not allow you to give anonymous users permission to add documents. You just can't do it.

You can however, create a web service that will accept the form, impersonate, and save the form to the library.


Solution:
There are two parts to this. First, trick the document library to allow you to have a "New" option for anonymous users. To do this, go to the anonymous access page, and look at the URL. See the "DOCLIB" at the end? Change that to LIST and reload the page. Now you'll have the option to check the box for new/edit/delete. Check the new box.

Second, Change you're form to submit to a web service. You'll have to create this service, and it should probably take a File name, and the file content. Maybe later I'll publish the code for this web service.

No comments: