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.