Instead of coding the email address into the doContactForm code, I'd like to be able to change it via the CMS in SiteConfig.
I understand how to do it if the form processor and database field are in the same Class…
public static $db = array(
'MailTo'=> 'Text'
);
function doContactForm($data, $form) {
//Set data
$from = $data['Email'];
$to = $this->MailTo;
…
}
So what's the best way to reference "MailTo" if that field was added to SiteConfig and the form processor was on Page.php?
Thanks