SharePoint 2013 - SPLessons

Chapter 41

SharePoint Forms

SharePoint Forms

There is a two WebParts are available in under Form Web Part.

  • HTML Form Web Part
  • Info path form Web Part

HTML Forms Web Part

The HTML Form Web Part enables you to connect simple form controls to other Web Parts.You can use the HTML Form Web Part to connect and pass data to another Web Part. For example, you can use the default HTML Form Web Part to type a region name, pass the value to a List View Web Part of customer data, and filter the data by that region. You can also customize the HTML Form Web Part to enable a user to, for example, select the region name from a drop-down list. You can use text boxes, drop-down lists, multi-line text boxes, check boxes, or option buttons in the HTML Form Web Part.

The way you connect fields to the other Web Part depends on how the other Web Part has been defined to use Web Part connections.Although you can have more than one element (text box, radio buttons, and so on) on your form, only one field can be connected to a List View Web Part. However, different fields can be connected to different Web Parts at the same time.

For example, you can have an HTML Form Web Part with a text box and a set of option buttons. The text box can be connected to one List View Web Part and the option buttons to another. When the user clicks the Go button, both List View Web Parts are filtered according to the information entered on the HTML Form Web Part.You can connect two or more fields in the HTML Form Web Part to another Web Part, if that Web Part can accept multiple parameters. In this case, you may need a SharePoint-compatible Web design program, such as SharePoint Designer 2010 to complete the connections.

Infopath Form Webpart

This is a brand new webpart in SP2010. This is a best pick if you want to display Infopath enabled / editable Lists or libraries. You can create all three kinds of infopath documents and can display all “Create”, “Edit” and “Display List” forms.