So i'm just trying to set a field attribute dynamically. Joomla Docs are pretty non saying so how should this work if i want to set all fields to "required"?
// works
$this->form->setFieldAttribute('phone','required','required');
// not working
$fields = $this->form->getFieldset('contact');
foreach ($fields as $field):
$this->form->setFieldAttribute($field->name,'required','required'); // this cannot be done directly on a field?
endforeach