diff --git a/forms/LabelField.php b/forms/LabelField.php index 044313c52..f1f373ef7 100755 --- a/forms/LabelField.php +++ b/forms/LabelField.php @@ -37,8 +37,7 @@ class LabelField extends DatalessField { function Field() { $attributes = array( 'class' => $this->extraClass(), - 'id' => $this->id(), - 'name' => $this->Name(), + 'id' => $this->id() ); return $this->createTag( 'label', diff --git a/tests/fieldtypes/LabelFieldTest.php b/tests/fieldtypes/LabelFieldTest.php new file mode 100644 index 000000000..4e51b831f --- /dev/null +++ b/tests/fieldtypes/LabelFieldTest.php @@ -0,0 +1,13 @@ +assertEquals($field->Field(), ''); + } +}