Hi,
I have been googling around for a while now, but somehow can't seem to find any answers even though this seems very simple problem. My goal is to add and edit some form fields in getCMSFields() method (no problem with that) and also to add some HTML content that comes from a template between some of the fields.
The template part is clear. I use something like this to get the HTML content from the template I want:
class MyDataObject extends DataObject
{
public function getCMSFields()
{
$fields = parent::getCMSFields();
$content = $this->renderWith('SomeTemplateForMyDataObject');
//Insert $content to $fields here. How? Or is there a better way?
return $fields;
}
}
Thank you for your kind support! :)