From ce8bf58b0dc8031fbc0e2da143a0e879ca47c796 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 15 Apr 2008 09:21:25 +0000 Subject: [PATCH] Merged revisions 32179 via svnmerge from svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.0-nzct ........ r32179 | ischommer | 2007-03-14 23:34:06 +1300 (Wed, 14 Mar 2007) | 1 line Return title when calling Name(), so we can do removeByName() on "anonymous" fields ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52774 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- forms/DatalessField.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/forms/DatalessField.php b/forms/DatalessField.php index 1a0cf4eeb..3fedb561a 100755 --- a/forms/DatalessField.php +++ b/forms/DatalessField.php @@ -40,5 +40,13 @@ class DatalessField extends FormField { function performReadonlyTransformation() { return $this; } + + /** + * As DatalessFields are not initialized with an ID/name, + * we keep the title for a unique reference. + */ + function Name() { + return $this->title; + } } ?> \ No newline at end of file