Sunday, September 28, 2014

Opening InfoPath Form in Modal Dialog

Question 


How to open InfoPath New and Edit forms in the Modal dialog?


Answer


Let us start with new fresh InfoPath Library. Create an InfoPath Library and call it "AccordionForms". The path of library would be like,


Let us examine new and edit form URLs.


New InfoPath Form:


If you click on the new item link, it would redirect to URL,


Wednesday, September 24, 2014

Create Info Path Accordion (Show Hide Section)

Previously i worked on the project which used InfoPath form. The Form had many sections and each section had scrolling and lot of data. I needed to introduce accordion in the form. I needed to add buttons to show hide any section of the form so that user can focus on what is required. InfoPath is different than the normal JQuery accordion where you can hide or show any thing based on script or just CSS. In InfoPath you need to add behavior and Rules for each button and section which we want to hide or we want to use as changing behavior or variable. Following is the how i achieved it,
1- First thing first, add two picture buttons (Having up and down pictures).  

2- Add Boolean variable ESShow and set its default value as 0 if you want to hide section when InfoPath form loads otherwise set its default value 1.


Content Editor Web Part Example (Writing Custom Web Part

The Content Editor Web Part (CEWP) allows you to add text, html, JQuery or styles to a SharePoint page. It is great to use this if you,

  1. Are good in JQuery or Javascript.
  2. Want to use Web Services, REST API (Introduced in SharePoint 2013) or ECMA script.
  3. Need One or two pages of customization and do not want to touch Visual Studio and going through process of uploading solutions.
  4. Do not have deployment permissions on Central Administration.

Add a Web Part to a page


1. From a page, in the ribbon, click the Page tab, and then click the Edit command.

Image: Edit command of the Edit tab

Display Parent web InfoPath form in child web InfoPath Form Web part

Problem

Yesterday i faced an issue while displaying Info Path form in the web part. My task was to show the Info Path form in the child web but actual Info Path library was on the parent web. The problem was when i tried to edit the Info Path web part, i could not see the list of Info Path library (from parent web) because it was showing only current site Info Path libraries.

Solution

I added new page in Page/Site Pages library of parent website. I added Info Path web part in the page and copied the Page from parent web to child web. Every thing worked fine in the child web Info Path web part page.

Copy Page to Child Site

Tuesday, September 23, 2014

Copying Web Part Page to same / other list of same web or child web

Problem


There are situations when you want to copy the web part page to same/other list in same web/child web. If you copy the page through SharePoint Designer, it will copy the page but the web parts will be removed.


Solution


Use site Content and Structure.

Procedure