Book Image

SharePoint 2013 WCM Advanced Cookbook

By : JOHN CHAPMAN
Book Image

SharePoint 2013 WCM Advanced Cookbook

By: JOHN CHAPMAN

Overview of this book

Table of Contents (19 chapters)
SharePoint 2013 WCM Advanced Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Validating data in InfoPath forms


When it comes to forms, it is usually important to ensure that the correct type of information is collected in each form field. In InfoPath, fields can be configured to be required or to only allow certain types of information, such as numbers. In addition, we can use validation rules to ensure the data entered meets the specified requirements, such as being a number greater than the number entered into the previous field.

In this recipe, we will create a required field that only allows whole numbers between 10 and 20.

How to do it...

Follow these steps to create a required field with a validation rule:

  1. Create a new form template or open an existing one in Microsoft InfoPath Designer 2013.

  2. Add a Text Box control to the form.

  3. Navigate to CONTROL TOOLS | PROPERTIES and with the Text Box control selected, change Data Type to Whole Number (Integer) as shown in the following screenshot:

  4. Select Field Properties from the Properties section of the ribbon.

  5. Select the Cannot...