SharePoint Tip of the Month

Forms in SharePoint 2013

July 2014

Forms are an important component of SharePoint 2013 as they are the key to allowing users to feed information into SharePoint. Having well designed forms enables users to enter accurate data which benefits the system as a whole.

The forms available out-of-the-box with SharePoint are usually adequate, yet leave much to be desired. Other products, such as InfoPath and Nintex Forms, have been used to expand the capabilities of forms in SharePoint over the years.

We are currently in a transition, of sort, with the options we get with forms in SharePoint. Microsoft has recently announced the discontinuation of InfoPath, probably the most popular form solution used in SharePoint today. They are discontinuing InfoPath in favor of more modern form solutions that not only work with on premise SharePoint, but also in Office 365 and mobile devices.

We’re going to look at some of the reasons InfoPath will be going away and then some options for replacing InfoPath functionality.

InfoPath Demo FormOver the years, InfoPath has become the tool of choice for building custom forms in SharePoint. InfoPath allowed users to quickly customize the look and feel of standard list forms, as well as build large and complex forms.

However, Microsoft has recently announced InfoPath’s demise.

Why did Microsoft drop InfoPath?

Microsoft is dropping InfoPath in favor of more modern ways to build forms in SharePoint. Here are some of the key problems with InfoPath:

  • InfoPath forms are saved as XML files within SharePoint form libraries. This makes getting data in and out of form a challenge. While you can promote certain fields within the form to corresponding list fields, the functionality is still limited, especially when you try to access repeating content within the form.
  • The bigger the form, the slower it becomes. Again, since all of the data, structure, and logic of the form are saved as XML, the bigger and more complex the form, the slower it becomes for users to load the form. Start adding attachments and your form becomes a sloth-like behemoth.
  • InfoPath forms are not very mobile friendly. In the days where smart phones and tablets are becoming more and more relevant for businesses, we need a form solution that both performs well and looks good in multiple device types. InfoPath just doesn’t cut it.

Can we continue to use InfoPath?

If you are already using InfoPath or you just need a simple custom form, then yes, InfoPath is still a great solution. While there will not be any updates to the InfoPath product, Microsoft will be supporting InfoPath until April 2023. This gives us plenty of time to continue to use InfoPath and find alternative solutions. If you are (or will be) an Office 365 customer, keep an eye on the Office 365 Roadmap. It’s quite possible that Microsoft will remove InfoPath as the default option for customizing list and workflow forms in Office 365 or even remove InfoPath Form Services long before 2023.

What will be the replacement for InfoPath?

Microsoft has not given us hints of a future product that will provide everything we have in InfoPath. In fact, the message from Microsoft seemed pretty clear that instead of one product we should look at using several different types of solutions to replace InfoPath. Each type of solution has its own purpose. This makes it important to understand what options we have to extend the out-of-the-box list forms and also what 3rd party products can be used going forward. I’ll walk through some of these options next.

Default List Form

Default List FormThe default list form that you get with SharePoint out-of-the-box has several advantages. The main advantage is that the form is build for you by SharePoint. You just need to define what fields you want to include in your list and viola, you have a simple form to add and update data in that list or library. The problem with these forms is that you have very little control over how the form is displayed and how it functions.

Here are some ways you can extend the functionality of the SharePoint list form.

List Validation
Every document library and list in SharePoint has a List Validation settings page. From here you can define simple field validation, for example, if the United States is selected in a country drop down, then a value must be selected in the State field. Otherwise the State field is not required. While very limited, the List Validation can be used if you have a simple validation requirement for your list.

Calculated Fields
A Calculated Field is a field type that can be added to any list or library. The calculated field can be used to do many different things; Perform simple arithmetic (e.g. Field 1 + Field 2 + Field 3), Concatinate multiple columns into a single value, or even run simple if-else conditions and display different results based on the outcome of the condition. Again, not an extremely powerful solution, but Calculated Fields are often used to bridge the gap between an out-of-the-box list form and a customo developed solution.

SharePoint Designer
If you have the permissions, and patience, you can also use SharePoint Designer to customize the out-of-the-box list forms. In SharePoint Designer 2013, the designer portion has been removed from the product, which means when you open the form you will see nothing but HTML, JavaScript, and CSS. However, if this doesn’t scare you away you can manipulate the HTML to change the layout of your form, or inject your own custom validation. Not an ideal solution for customizing a lot of forms, but if you have a unique requirement it is worth considering if it can be accomplished with SharePoint Designer.

JS Link
JS Link is a new capability added to SharePoint 2013. It utilizes the same concept as Display Templates for search results and content search web parts. You simply create a JavaScript file with the expected structure, add it to your Style Library, and then point your list view or list form to this file.

JS Link can be used to change the way one or more fields are rendered on the screen. It can also be used to add additional validation and logic to the form. You do need some JavaScript and HTML skills to make this work though.

Event Receivers
Event ReceiversCustom developed Event Receivers can be used to apply advanced validation to out-of-the-box list forms. While this option does require a developer to build and deploy the event receiver, it can be an easy way to add the advanced validation you need to your form without customizing the form itself. Unfortunately, the user experience is a bit lacking since we have limited control over where the validation message is displayed.

Excel Survey

SharePoint Saturday Atlanta 2014An alternative to using a standard SharePoint List form, Excel Surveys can be used to create simple questionnaires that can be sent out to people within or even outside of your organization.

This functionality is already available in Office 365 and OneDrive but not in on-premises installations.

Some things to note about Excel Surveys:

  • Only available in Office 365 and OneDrive
  • An administrator must enable Sharing with external users at the site collection being used to host the surveys.
  • Excel Surveys are anonymous so you cannot see who actually completed the survey unless you ask them to enter their name and information manually.
  • You can add as many questions as you wish, but you can only reorder them.
  • All of the results are stored in an Excel document.

Access App

List DetailsIf you need a form solution that allows you to quickly capture data, associate related data, and store all of this in SQL, then you might want to look at Access Apps.

An Access App is very easy to get started and is available in SharePoint 2013 today. While they are great for building an application with a lot of relational data, there are some drawbacks:

  • You have limited control over the overall layout of the application. You can change the layout of each form individually, but the overall look and feel is not configurable.
  • The data is not stored in SharePoint. It is stored in its own SQL database. You can read data from an existing SharePoint list, but you cannot save data back into SharePoint. This makes Access Apps a very stand-alone application.
  • You can add advanced validation and logic with the use of macros.

Structured Document

Registration FormA structured document is simply a form created in Microsoft Word that is configured to allow the users to enter data only into the designated form fields with the rest of the document remaining locked down. This is a great solution for large, static forms that need to be completed and saved to a SharePoint Document Library. Currently there is limited integration between Microsoft Word and SharePoint, but Microsoft may add more functionality in the future if enough users request it.

Structured Documents work great when you have large, complex forms that don’t need to change dynamically as the user completes them. These forms are often saved directly into SharePoint as a document and can then be routed through workflows or other validation.

An alternative to using Microsoft Word is to create PDF documents. For a product that lets you build PDF Documents with tight integration with SharePoint, take a look at PDF Share Forms.

Custom Development

Form Demo ItemCustom development can be both time consuming and expensive. However, if you have a very complex form or need to support many custom forms, and you have a development team handy, then custom development could be a very viable alternative to InfoPath.

We can build custom forms that can do just about anything in SharePoint without deploying a single line of code to the SharePoint servers. This can be accomplished using the new CSOM and REST APIs available in SharePoint 2013. Taking the time to build a solid foundation, along with support from powerful JavaScript frameworks such as AngularJS and JQuery, we can streamline the process of building custom forms, and maximize the code reusability to help lower implementation and maintenance costs.

Custom development may be the best option when you have a lot of complexity in your forms and when performance is important.

Nintex Forms

Nintex FormsNintex Forms, arguably the closest InfoPath replacement, can replace a lot of what InfoPath can do.

  • Customize both workflow and list forms.
  • Data is saved directly to the SharePoint list.
  • Customizable layout and branding.
  • Advanced validation.
  • Supports most SharePoint Field Types.
  • Mobile friendly layouts.
  • Mobile apps.
  • Easy to use and highly configurable.
  • Available on premise and in Office 365.

Nintex Forms integrates nicely with SharePoint and, unlike InfoPath, is constantly getting new features and updates. Since Nintex Forms is 100% browser-based and is very mobile friendly, it doesn’t have the issues that are stopping InfoPath from progressing as a viable forms solution.

Nintex Forms is also a big time saver when you need to easily customize SharePoint list forms since they can be designed right in the browser by any user with the appropriate permissions.

In Summary

There are a lot of alternative options out there to replace InfoPath. I’ve only scratched the surface here. Keep in mind the following:

  • How many InfoPath forms do we currently have in our environment?
  • How often do we need custom forms in our environment?
  • How complex are the custom forms in our environment?
  • How big is our environment? (Third-party products usually license by the server.)
  • Do we have an efficient development team (internal or outsourced)?
  • Do we have power users who can build their own forms if given the right product?

Also remember that InfoPath is not going away immediately. We have some time to find valid replacements that work in your organization. There are already many products available that claim to be the replacement for InfoPath. As time goes on, there will be many more options.

This TOTM was contributed by Sr. SharePoint Consultant, Eric Gregorich.