2
フィールドの属性を動的に設定しようとしています。 Joomlaのドキュメントは、私がすべてのフィールドを「必須」に設定したい場合、どのようにすればいいのでしょうか?ループ内のsetFieldAttribute
// 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