BUGFIX: Fix Form.FieldMap, used when constructing forms that have the HTML explicitly specified.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90851 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-11-05 01:14:54 +00:00
parent c4581f741a
commit e3fa5cae7f

View File

@ -1267,7 +1267,7 @@ class Form extends RequestHandler {
}
}
class Form_FieldMap extends Object {
class Form_FieldMap extends ViewableData {
protected $form;
function __construct($form) {
@ -1275,6 +1275,13 @@ class Form_FieldMap extends Object {
parent::__construct();
}
/**
* Ensure that all potential method calls get passed to __call(), therefore to dataFieldByName
*/
function hasMethod($method) {
return true;
}
function __call($method, $args = null) {
return $this->form->dataFieldByName($method);
}