Hi,
this piece of code seems useless:
--- FieldEditor.php.orig 2007-01-19 12:01:24.000000000 +1300
+++ FieldEditor.php 2007-06-11 11:35:20.000000000 +1200
@@ -114,16 +114,6 @@
}*/
function addfield() {
- // get the last field in this form editor
- $parentID = $this->form->getRecord()->ID;
- $lastField = DataObject::get('EditableFormField', "`ParentID`='$parentID'", "`Sort` DESC", null, 1 );
-
- $nextSort = 1;
-
- // the new sort value is the value of the last sort + 1 if a field exists
- if( $lastField )
- $nextSort += $lastField->Sort;
-
$className = "Editable" . ucfirst($_REQUEST['Type']);
$name = $this->name;
if(is_subclass_of($className, "EditableFormField")) {