# Is it possible to change the Required and Read-Only field colors that workflowgen uses to different colors in my web form?

**URL:** <https://discuss.workflowgen.com/t/is-it-possible-to-change-the-required-and-read-only-field-colors-that-workflowgen-uses-to-different-colors-in-my-web-form/162>\
**Category:** Visual Studio Web Forms\
**Created:** [April 28, 2008, 7:54am UTC](https://discuss.workflowgen.com/t/is-it-possible-to-change-the-required-and-read-only-field-colors-that-workflowgen-uses-to-different-colors-in-my-web-form/162 "2008-04-28T07:54:26Z")\
**Posts on this page:** 3\
**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:** [April 28, 2008, 7:54am UTC](https://discuss.workflowgen.com/t/is-it-possible-to-change-the-required-and-read-only-field-colors-that-workflowgen-uses-to-different-colors-in-my-web-form/162/1 "2008-04-28T07:54:26Z")

</div>

Yes, it is possible to change the colors used by WorkflowGen for the fields that are Required or Read-Only in your web forms. The WorkflowGen.My.dll contains a property for both that you can assign the colors you wish. you must include the proper

Add the following to your code in the Page\_Load method:

C#

```auto
using System.Drawing;
public partial class _Default : WorkflowPage 
{
 protected void Page_Load(object sender, EventArgs e) {
 // set the read-only border color to Light Grey and required border color to Orange 
 this.ReadOnlyFieldsBorderColor = Color.FromArgb(210, 210, 210); 
 this.RequiredFieldsBorderColor = Color.Orange; 
 }
}

```

VB.NET

```auto
Imports System.Drawing
Public Class _Default Inherits WorkflowPage 
 Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) 
 'set the read-only border color to Light Grey and required border color to Orange 
 Me.ReadOnlyFieldsBorderColor = Color.FromArgb(210, 210, 210) 
 Me.RequiredFieldsBorderColor = Color.Orange 
 End Sub
End Class

```

---

<div class="post-metadata">

**Author:** ![james](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@james](https://discuss.workflowgen.com/u/james)\
**Post date:** [June 12, 2018, 3:33pm UTC](https://discuss.workflowgen.com/t/is-it-possible-to-change-the-required-and-read-only-field-colors-that-workflowgen-uses-to-different-colors-in-my-web-form/162/2 "2018-06-12T15:33:17Z")

</div>

Could this also be used for the form sections (divs) that are read-only for an action step?

Thanks,

James

---

<div class="post-metadata">

**Author:** ![james](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@james](https://discuss.workflowgen.com/u/james)\
**Post date:** [June 12, 2018, 4:07pm UTC](https://discuss.workflowgen.com/t/is-it-possible-to-change-the-required-and-read-only-field-colors-that-workflowgen-uses-to-different-colors-in-my-web-form/162/3 "2018-06-12T16:07:15Z")

</div>

Update: I was able to do this in code behind:

if (this.CurrentWorkflowActionName == “NAME\_OF\_STEP”) {  
Div\_Name.Style.Add(“background-color”, “#D3D3D3”); //hex color code is for light grey

```
    }
```
