# How do I modify the default behavior of required fields on my form, particularly the message displayed in the alert box when trying to submit the form?

**URL:** <https://discuss.workflowgen.com/t/how-do-i-modify-the-default-behavior-of-required-fields-on-my-form-particularly-the-message-displayed-in-the-alert-box-when-trying-to-submit-the-form/159>\
**Category:** Visual Studio Web Forms\
**Created:** [July 21, 2008, 3:47am UTC](https://discuss.workflowgen.com/t/how-do-i-modify-the-default-behavior-of-required-fields-on-my-form-particularly-the-message-displayed-in-the-alert-box-when-trying-to-submit-the-form/159 "2008-07-21T03:47:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wfg-admin](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/wfg-admin/32/714_2.png) [@wfg-admin](https://discuss.workflowgen.com/u/wfg-admin)\
**Post date:** [July 21, 2008, 3:47am UTC](https://discuss.workflowgen.com/t/how-do-i-modify-the-default-behavior-of-required-fields-on-my-form-particularly-the-message-displayed-in-the-alert-box-when-trying-to-submit-the-form/159/1 "2008-07-21T03:47:00Z")

</div>

The message `The field {0} is required` (where `{0}` is the tooltip that was set on the validated control) is the default text displayed to end-users when submitting the form without providing a response to a required control.

If no tooltip was found, the ID of the control will be used. The ID of the control will usually not be appropriate to display to end-users, so we strongly recommend assigning a value to the tooltip property for all required controls on your form. If you want to have a personalized message, you have to change the `RequiredFieldsErrorMessage` property. Be sure to the include `{0}` symbol in your personalized message, otherwise WorkflowGen will throw an exception.

#### Example

In the `Page_Load` event of your web form, provide the following line of C# code:

```auto
this.RequiredFieldsErrorMessage = "{0} is a required field. Please provide a response.";

```

You can also modify the default border color of required controls. While the default color is red, you can change the color to blue with the following line of code:

```auto
this.RequiredFieldsBorderColor = System.Drawing.Color.Blue;

```
