Hi,
You can use the attributes
or class
field argument.
The attributes
argument overrides class attributes. It supports the following nested elements and can apply own values to corresponding elements:
– fieldrow
– fieldset
– fields
– field
'attributes' => array(
'fieldrow' => array(
'class' => array( 'test-attr-fieldrow1', 'test-attr-fieldrow2' ) // accepts an array for multiple items
),
'fieldset' => array(
'class' => 'test-attr-fieldset1 test-attr-fieldset2'
),
'fields' => array(
'class' => 'test-attr-fields1 test-attr-fields2s'
),
'field' => array(
'class' => 'test-attr-field'
),
'class' => 'test-attr-input',
)
The class
argument appends given selectors to the class attribute and supports the following elements:
– fieldrow
– fieldset
– fields
– field
'class' => array(
'fieldrow' => array( 'test-fieldrow1', 'test-fieldrow2' ), // accepts an array for multiple items
'fieldset' => 'test-fieldset1 test-fieldset2',
'fields' => 'test-fields',
'field' => 'test-field',
),
It is recommended to use the class
argument as some elements with a class attribute are used by the framework for JavaScript and CSS. There is a known bug however with the class
argument that the field input element also gets the added selectors for other elements. This might confuse you a bit but it is a bug.