Understanding Render Attributes

Anne Rosebery
Form Developers

What are Render Attributes

RenderAttributes

Render attributes are attributes that are added to a field or element when it is rendered. Common render attributes are class or id, but there are any number of attributes that could be set for use with various javascript libraries.

How Render Attributes are Applied to an Element

To apply a render attribute, for example, class, you would provide the attribute and its desired value in the render attribute section of the field/element to add the attribute and save your item.

RenderAttr3

Then you would see your render value on your field/element:

RenderAttr4.2

What Render Attributes to use

This is greatly variable depending what libraries are loaded in your particular theme/bundle. Render attributes are all about display and leveraging available options. Those available/valid attributes depend on what is available to your forms when they render. (etc)