public function getCMSFields() {
		preg_match("/<body[^>]*>(.*?)<\/body>/is", $this->Body, $matches);
		$contents = $matches ? $matches[1] : "";

		$f = FieldList::create(
			ReadonlyField::create('To'),
			ReadonlyField::create('Subject'),
			ReadonlyField::create('BCC'),
			ReadonlyField::create('CC'),
			HeaderField::create('Email contents', 5),
			LiteralField::create('BodyContents', "<div class='field'>{$contents}</div>")
		);

		$this->extend('updateCMSFields', $f);

		return $f;
	}
public function getCMSFields() {
		preg_match("/<body[^>]*>(.*?)<\/body>/is", $this->Body, $matches);
		$contents = $matches ? $matches[1] : "";

		$f = FieldList::create(
			ReadonlyField::create('To'),
			ReadonlyField::create('Subject'),
			ReadonlyField::create('BCC'),
			ReadonlyField::create('CC'),
			HeaderField::create('Email contents', 5),
			LiteralField::create('BodyContents', "<div class='field'>{$contents}</div>")
		);

		$this->extend('updateCMSFields', $f);

		return $f;
	}
public function getCMSFields ( ) { preg_match ( "/<body[^>]*>(.*?)<\/body>/is" , $ this -> Body , $ matches ) ; $ contents = $ matches ? $ matches [ 1 ] : "" ; $ f = FieldList :: create ( ReadonlyField :: create ( 'To' ) , ReadonlyField :: create ( 'Subject' ) , ReadonlyField :: create ( 'BCC' ) , ReadonlyField :: create ( 'CC' ) , HeaderField :: create ( 'Email contents' , 5 ) , LiteralField :: create ( 'BodyContents' , "<div class='field'>{$contents}</div>" ) ) ; $ this -> extend ( 'updateCMSFields' , $ f ) ; return $ f ; }
Gets a list of form fields for editing the record.
These records should never be edited, so a readonly list of fields
is forced.

@return FieldList
Gets a list of form fields for editing the record . These records should never be edited so a readonly list of fields is forced .