Render Hook

Learn about Render Hook attribute.

Use the Render Hook attribute to define conditional formatting (colors, icons, styles) for fields depending on a field's value.

Note: Render hooks defined for a field that is part of a combined field always apply to the entire combined field. For further details, see Add Combined Field.In forms render hooks apply only to the respective cell (not to an entire widget). For further details, see Forms.

The provided Render Hook is executed as JavaScript code (without any transformation) – thus, you can use standard JavaScript syntax.

The following functions are available:

Function

Description

setBackgroundColor

Changes a field's background color.

setColor

Changes a field's font color.

setContextBackgroundColor

Defines the background color of the element hosting the widget, e.g. the list row.

imageAdd

Adds an image in front of the field value.

imageReplace

Replaces the field value by an image.

addClass

Changes the field attributes corresponding to the CSS style.

For detailed information on the syntax and some examples. For further details, see Defining Render Hooks.