JForm has many methods for working with fields and field attributes.

For example, to set an attribute to a field, you can use this method.

 $form->setFieldAttribute('ID_BREED', 'hint', ''); 

Or in order to remove the field from the form on the fly.

 $form->removeField('ID_COLOUR'); 

But how to change the attribute at the fieldset and not at the field in it, as I can not figure it out. Please help.

    1 answer 1

    That's what I got if anyone is interested. True code is not particularly kosher.

     $xml = $form->getXml(); $xmlelement = array_shift($xml->xpath("//fieldset[@name='info']")); if ($xmlelement instanceof SimpleXMLElement) { $xmlelement->attributes()->label = "Информация о товаре"; }