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

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#

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

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

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

Thanks,

James

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

    }
1 Like