Skip to Main Content
Essential SharePoint 2007, 2nd Edition
book

Essential SharePoint 2007, 2nd Edition

by Jeff Webb
September 2007
Beginner content levelBeginner
448 pages
10h 2m
English
O'Reilly Media, Inc.
Content preview from Essential SharePoint 2007, 2nd Edition

Validating Data

One advantage of using Submit rather than Save is that Submit enforces data validation. InfoPath allows you to save forms containing invalid data, but you can't submit the form until all fields are valid. InfoPath can validate fields using a variety of criteria. To add validation criteria to a control:

  1. Display the control's properties and click Data Validation. InfoPath displays the Data Validation dialog box.

  2. Click Add. InfoPath displays the dialog box for validation criteria. Enter a condition that results in a validation error.

  3. Click OK and then preview the form and test the validation.

You can combine multiple criteria by choosing And >>, but you can only have one ScreenTip and Message per control.

Validation rules are checked as the user enters data on the form. If an invalid entry is made in a control, that entry is flagged as soon as the focus moves to another control.

Forms containing validation errors can't be submitted, but users only receive a warning if they save or email a form containing validation errors. There is no built-in way to prevent the user from saving, emailing, or printing a form containing validation errors, but you can avoid it by following these steps:

  1. Choose Tools → Form Options → Open and Save. Disable the Save, Print, and Send to Mail Recipient options. Click OK to close the dialog box.

  2. Add buttons to the form to save, print, or submit the form.

  3. Add a checkbox to enable or disable the save/print/esp2_submit buttons as described in "Customizing ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® Office SharePoint® Server 2007 Best Practices

Microsoft® Office SharePoint® Server 2007 Best Practices

Ben Curry, Bill English
SharePoint 2007: The Definitive Guide

SharePoint 2007: The Definitive Guide

James Pyles, Christopher M. Buechler, Bob Fox, Murray Gordon, Michael Lotter, Jason Medero, Nilesh Mehta, Joris Poelmans, Christopher Pragash, Piotr Prussak, Christopher J. Regan

Publisher Resources

ISBN: 9780596514075Errata Page