Change control label element class

2 years ago

LRJ
Member | 6
+
0
-

Hi,

anyone has an idea how to add class to label element?

$control->getLabel() returns just a clone, doesn't make much sense to me.

public function getLabel($caption = NULL)
{
    $label = clone $this->label;
    $label->for = $this->getHtmlId();
    $label->setText($this->translate($caption === NULL ? $this->caption : $caption));
    return $label;
}

Thanx for any info :)

2 years ago

ali
Member | 309
+
+1
-

Use getLabelPrototype method.

Last edited by ali (2017-08-24 05:48)