src/Forms/FormField.php
public function Field($properties = array())
    {
        $context = $this;

        $this->extend('onBeforeRender', $context, $properties);

        if (count($properties)) {
            $context = $context->customise($properties);
        }

        $result = $context->renderWith($this->getTemplates());

        // Trim whitespace from the result, so that trailing newlines are supressed. Works for strings and HTMLText values
        if (is_string($result)) {
            $result = trim($result);
        } elseif ($result instanceof DBField) {
            $result->setValue(trim($result->getValue()));
        }

        return $result;
    }
public function Field($properties = array())
    {
        $context = $this;

        $this->extend('onBeforeRender', $context, $properties);

        if (count($properties)) {
            $context = $context->customise($properties);
        }

        $result = $context->renderWith($this->getTemplates());

        // Trim whitespace from the result, so that trailing newlines are supressed. Works for strings and HTMLText values
        if (is_string($result)) {
            $result = trim($result);
        } elseif ($result instanceof DBField) {
            $result->setValue(trim($result->getValue()));
        }

        return $result;
    }
public function Field ( $ properties = array ( ) ) { $ context = $ this ; $ this -> extend ( 'onBeforeRender' , $ context , $ properties ) ; if ( count ( $ properties ) ) { $ context = $ context -> customise ( $ properties ) ; } $ result = $ context -> renderWith ( $ this -> getTemplates ( ) ) ; // Trim whitespace from the result, so that trailing newlines are supressed. Works for strings and HTMLText values if ( is_string ( $ result ) ) { $ result = trim ( $ result ) ; } elseif ( $ result instanceof DBField ) { $ result -> setValue ( trim ( $ result -> getValue ( ) ) ) ; } return $ result ; }
Returns the form field.

Although FieldHolder is generally what is inserted into templates, all of the field holder
templates make use of $Field. It's expected that FieldHolder will give you the "complete"
representation of the field on the form, whereas Field will give you the core editing widget,
such as an input tag.

@param array $properties
@return DBHTMLText
Returns the form field .