Hi all,
I am trying to add custom attributes to an element generated with JDom. How do I go about that?
For example, I have a radio button and I want to add an attribute 'data-col-classes="test"' to the html element. I was thinking to use the selectors array, something like this:
<?php
echo JDom::_('html.form.input.radio', array(
'domId' => 'hsmOTPriority',
'dataKey' => 'hsmOTPriority',
'labelKey' => 'text',
'list' => $this->lists['select']['priority']->list,
'listKey' => 'value',
'selectors' => array(
'data-col-classes' => 'test'
)
));
But that does not seem to work. Am I doing something wrong or should I achieve this in a different way?
Thanks,
Misha