diff --git a/forms/PhoneNumberField.php b/forms/PhoneNumberField.php index c698e8047..a3a0ac30b 100644 --- a/forms/PhoneNumberField.php +++ b/forms/PhoneNumberField.php @@ -31,7 +31,6 @@ class PhoneNumberField extends FormField { $fields = new FieldGroup( $this->name ); $fields->setID("{$this->name}_Holder"); list($countryCode, $areaCode, $phoneNumber, $extension) = $this->parseValue(); - $hasTitle = false; if ($this->value=="") { $countryCode=$this->countryCode; @@ -51,7 +50,7 @@ class PhoneNumberField extends FormField { } if($this->ext !== null) { - $field->push(new NumericField( $this->name.'[Extension]', 'ext', $extension, 6)); + $fields->push(new NumericField( $this->name.'[Extension]', 'ext', $extension, 6)); } $description = $this->getDescription(); @@ -62,7 +61,7 @@ class PhoneNumberField extends FormField { $field->setReadonly($this->isReadonly()); } - return $field; + return $fields; } public function setValue( $value ) {