Microsoft KB Archive/891816

= How to specify validation for a field on a form and how to specify a validation error page for a form in FrontPage 2003, in Expression Web, and in SharePoint Designer 2007 =

Article ID: 891816

Article Last Modified on 6/4/2007

-

APPLIES TO


 * Microsoft Office SharePoint Designer 2007
 * Microsoft Office FrontPage 2003
 * Microsoft Expression Web

-



INTRODUCTION
This article describes how to specify validation for a field on a form and how to specify a validation error page for a form in Microsoft Expression Web, in Microsoft Office SharePoint Designer 2007, and in Microsoft Office FrontPage 2003.

Note The examples in this article describe how to validate a Textbox field. However, these steps can be used for other types of fields on a form.



How to specify validation for a field on a form in Expression Web or in SharePoint Designer 2007
To specify validation for a field on a form, follow these steps:
 * 1) Open your Web site.
 * 2) In Design view, click to add an insertion point into the page.
 * 3) In the Tookbox task pane, right-click Input (Text) under Form Controls, and then click Insert.
 * 4) Right-click the text box, and then click Form Field Properties.
 * 5) In the Text Box Properties dialog box, click Validate.
 * 6) In the Text Box Validation dialog box, select the types of validation that you want. To require that the user enter data for the field, select the Required check box under Data length.
 * 7) Click OK to close the Text Box Validation dialog box.
 * 8) Click OK to close the Text Box Properties dialog box.

How to specify a validation error page for a form in Expression Web and in SharePoint Designer 2007
Validation is performed by JavaScript on the client computer. If JavaScript is turned off in the Web browser, the URL that is specified in the following steps is displayed.

To specify a validation error page for a form, follow these steps:
 * 1) Open your Web site.
 * 2) Open the Web page that contains your form.
 * 3) Right-click the form, and then click Form Properties.
 * 4) In the Form Properties dialog box, click Options.
 * 5) Click the Confirmation Page tab.
 * 6) In the URL of validation failure page (optional) text box, type the URL to the validation error page that you want to be displayed.

Note This step assumes that you have already created the validation error page that you want to be displayed. If you do not specify a URL in this step, Expression Web or SharePoint Designer 2007 displays a default error page.
 * 1) Click OK to close the Saving Results dialog box.
 * 2) Click OK to close the Form Properties dialog box.

How to specify validation for a field on a form in FrontPage 2003
To specify validation for a field on a form, follow these steps:
 * 1) Open your Web site.
 * 2) On the File menu, click New.
 * 3) On the New task pane, click Blank page.
 * 4) On the Insert menu, point to Form, and then click Textbox.
 * 5) Right-click the text box, and then click Form Field Properties.
 * 6) In the Text Box Properties dialog box, click Validate.
 * 7) In the Text Box Validation dialog box, select the types of validation that you want. To require that the user enter data for the field, select the Required check box under Data length.
 * 8) Click OK to close the Text Box Validation dialog box.
 * 9) Click OK to close the Text Box Properties dialog box.

How to specify a validation error page for a form in FrontPage 2003
Validation is performed by JavaScript on the client computer. If JavaScript is turned off in the Web browser, the URL that is specified in the following steps is displayed.

To specify a validation error page for a form, follow these steps:
 * 1) Open your Web site.
 * 2) Open the Web page that contains your form.
 * 3) Right-click the form, and then click Form Properties.
 * 4) In the Form Properties dialog box, click Options.
 * 5) Click the Confirmation Page tab.
 * 6) In the URL of validation failure page (optional) text box, type the URL to the validation error page that you want to be displayed.

Note This step assumes that you have already created the validation error page that you want to be displayed. If you do not specify a URL in this step, FrontPage 2003 displays a default error page.
 * 1) Click OK to close the Saving Results dialog box.
 * 2) Click OK to close the Form Properties dialog box.

Additional query words: kbnoOfficeAlertID frontpage2003 fp2003 fp2k3 EW EWD SPD SPD2007

Keywords: kbforms kbhowto KB891816

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.