Quick Tip: Making InfoPath form fields read-only

by S.Y.M. Wong-A-Ton | Filed under: InfoPath 2007

Learn how to make an InfoPath form read only by using an InfoPath read only field, an InfoPath read only view, or use conditional formatting for read only purposes.

There are 2 ways you can make an InfoPath field read only:

  1. Select the Read-only property on the Display tab of the Properties dialog box of a control.
  2. Use Conditional Formatting to either make a control Read-only or to Disable a control if a control cannot be made read-only.

However, if you have many controls on your InfoPath form template, setting the read-only property or applying conditional formatting to each control can quickly make your InfoPath form template difficult to maintain. On such occasions it is best to create what’s called an InfoPath read only view.

In InfoPath you can create a View and then set the entire view to be read-only. This will make all of the controls you place on that view read-only, and thus also the InfoPath form read only. This way you won’t have to maintain the read-only property or conditional formatting on individual controls.

One disadvantage of using a an InfoPath read only view is that you’ll be unable to place InfoPath read-only fields and non-read-only fields on the same view.

In summary:

  1. If you have less than 10 controls that have to be read-only on your InfoPath form, you can use the read-only property or conditional formatting on those controls.
  2. If you have many controls on your InfoPath form template that have to be read-only, try constructing your InfoPath form template in such a way that you can create a read-only view and place the controls that need to be read-only on that view. And if you require a mixture of read-only and non-read-only controls in your InfoPath form solution, you may consider creating a read-only view for the read-only controls and use a button with a rule to switch between the read-only view and other views in your InfoPath form solution.
  3. If you require read-only and non-read-only controls on the same view, your only option will be to use the read-only property or conditional formatting on controls.

For instructions on how to create an InfoPath read-only view, see the following Office Online article: Design a read-only view.

Related Posts

Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent of S.Y.M. Wong-A-Ton. Usage of techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author, S.Y.M. Wong-A-Ton.

InfoPath 2010 Cookbook

InfoPath 2010 Cookbook 2: 101 Codeless Recipes for SharePoint 2010