Thursday, April 23, 2009

How to create InfoPath form Web Part Pages in SharePoint 2007

This wonder gem was put together by Nick Grattan.

How to Host Microsoft InfoPath Forms in SharePoint 2007 Web Part Pages

Follow his instructions and you will be able to embed your InfoPath form as a web part.

I wanted to create a web part page that was not part of the main site.  Following the document Nick created I was able to create a full page form that closed once the end user clicks submit.

This form template is browser-compatible, but it cannot be browser-enabled on the selected site

Check if the default “Form Templates” option in appearing under “View all site contents” page. If it is not enabled by default, then you can follow this following steps.

If "Office SharePoint Server Enterprise Site Features" is enabled but we don't see the default "Form Templates" on the "View all site contents" page, then you should use the following steps.

  • Make sure they have backup of everything.

  • Opened the site http://<your site url> in SharePoint Designer.

  • Select the root URL and click FILE >> NEW >> SharePoint Content

  • Choose Document Library >> Form Library

  • Under options type the name as “FormServerTemplates” and it will create the content.

  • Now right click on “FormServerTemplate” and open “Properties”

  • On settings Tab change the name to “Form Templates” and uncheck the option “Use a template for new documents”

  • Click OK

  • Now you should see “Form Templates” on the view all site content page.

  • You should be able to publish the InfoPath form with "Enable this form to be filled out by using a browser."

Thanks and Regards,

Amit Bajaj

 

many thanks to MSDN Developer Network forums for this helpful tip.

http://social.msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/c9617953-a54c-44ec-86cf-df215c750c18#

Use an InfoPath form that submits data to a restricted SharePoint Form Library?

Background info: I have a need to allow all active domain users access to submit a form but only certain members of a department are allowed to review the results.

Interesting dilemma. Not much out there on the web for this specific request – I’ve looked and looked. I didn’t want to have to write (or more realistically have my Dev dept write) a bunch of code to make an area private. I’m not a code writer.

Finding this gem took a while poking around.

Its from OK State EDU IT SharePoint FAQ

The below steps describe how to create a form to be published from Microsoft Office InfoPath to a SharePoint Form Library. You will need InfoPath 2007, SharePoint Designer 2007, and two SharePoint sites on the same or one level apart for this solution.

This entry does not describe how to build a form in InfoPath.

  1. From the parent SharePoint site, create a second site either below or on the same level as the site where you want to store the form data.
  2. Create a Form Library on the parent SharePoint site.
  3. Before the form has been published, in InfoPath, select Tools from the menu bar and then Submit Options.
  4. Select the submit that sets the form to the Document Library from the drop down list box and click Manage.
  5. Click the Modify button on the right hand side of the new window.
  6. Ensure that the Document Library text box is submitting forms to the parent SharePoint site Form Library created in step 2. Enter a file name for the form in the second text box and click Next >.
  7. Click Finish.
  8. Publish the form to the lower SharePoint site document library after you have selected File and then Publish... from the menu bar in InfoPath.
  9. Log into the lower SharePoint site.
  10. Open the Form Library that you created in step 8.
  11. From the Settings drop down box on the Form Library, select Form Library Settings.
  12. Under the Permissions and Management heading, click Permissions for this Form Library.
  13. Click on the New button in the Form Library.
  14. Enter the user(s)/group(s) that can access the form in the Users/Groups box.
  15. Select the Give users permission directly radio button and check the Contribute permission level.
  16. If you want to send a notification to the user(s)/group(s) check the box next to Send welcome e-mail to the new users and fill out the rest of the form. (NOTE: If you have added a large number of users or a group with a high number of people, it is not advisable to send a welcome message as it can overwork the e-mail servers.)
  17. Click OK.
  18. Log out of the lower site and into the parent SharePoint site.
  19. Create a custom permission named Write Overwrite with the following boxes checked...
    1. Add Items
    2. Edit Items
    3. View Items
    4. View Pages
    5. Open
  20. Click Submit.
  21. Open the Form Library on the parent SharePoint site that you set to submit to in step 2.
  22. Click the Settings drop down button and select Form Library Settings.
  23. Open Permissions for this form library under the Permissions and Management section.
  24. Click the New button.
  25. Enter the same user(s)/group(s) that you entered in step 14, except give the permission level that you created in step 19.
  26. Click OK.

The people that you have given rights to should now be able to access the form from the lower SharePoint site but not see the data submitted to the parent site.

The following steps will replace the Form Library web page on the lower SharePoint site so that the person submitting the form does not get redirected to the Form Library.

  1. Open Microsoft Office SharePoint Designer.
  2. Open the lower SharePoint site to edit.
  3. Browse to the folder where the Form Library *.aspx files are.
  4. Rename the AllItems.aspx file to AllItems1.aspx.
  5. Create a new blank aspx page named AllItems.aspx and save it to the same directory as AllItems1.aspx

Edit the new AllItems.aspx file's HTML content that will be displayed

To create a custom permission in SharePoint 2007 (3.0), follow the steps below.

1. On the main page of the SharePoint site click the Site Actions button in the upper right hand corner.

2. From the drop down list select Site Settings

3. On the next page, click Advanced Permissions under the Users and Permissions heading

4. On the next page, select the Settings drop down.

5. From the list, choose Permission Levels.

6. On the next page, click the Add a Permission Level button.

7. Fill out the form on the page with a name for the permission and criteria. (NOTE: Some criteria rely on other check boxes to be selected)

Only the site and all sub-sites will have the permission created.

Tuesday, April 21, 2009

Shhh dont wake the sleeping giant

I really need to start posting here.

I have a new monster sleeping in my head.  Two actually.  SharePoint and its close friend InfoPath.  I inherited SharePoint thx to work letting the main admin go and had no backup.  InfoPath came next mainly due to me taking a SharePoint class (so I know kind of what Im doing) and InfoPath was mentioned.

I now have 3 projects around InfoPath forms and making those available via SharePoint web part.

I can tell you right now there is a lot of STUFF on the Internet on InfoPath but nothing that is helpful for me.  I get bread crumbs.  So I will now post what I find useful here.  And make sure I give kudos to where/who I got the bread crumbs from.  I figure the more places its mentioned, it may make it a bit easier for the next person searching.

Another fun (sarcastic fun mind you) bit is Work has blocked most blogger type programs, Flicker (and other picture dbs), twitter and Im sure others.  Makes things a bit interesting posting what I want to.  I will attempt to send what I find during work via email and hope pics (if any) come in.  Else everything gets to wait for when I get home and remember :oP