renderWith(array(
$this->class,
'Form'
));
}
function doForm($data, $form) {
$email = new ContactPage_Email(
$data['Email'],
'admin@somewhere.com',
'The contact page has been submitted'
);
$email->populateTemplate(array(
'FormData' => new ArrayData($data)
));
$email->send();
Director::redirect('finished-page'); // Redirect to the page with the URLSegment 'finished-page'
}
}
?>