protected function formatField(Field $field)
    {
        $jsonKey = $field->column();

        $elementName = $elementClass = $errorKey = [];

        if (is_array($jsonKey)) {
            foreach ($jsonKey as $index => $name) {
                $elementName[$index] = "{$this->column}[$name]";
                $errorKey[$index] = "{$this->column}.$name";
                $elementClass[$index] = "{$this->column}_$name";
            }
        } else {
            $elementName = "{$this->column}[$jsonKey]";
            $errorKey = "{$this->column}.$jsonKey";
            $elementClass = "{$this->column}_$jsonKey";
        }

        $field->setElementName($elementName)
            ->setErrorKey($errorKey)
            ->setElementClass($elementClass);

        return $field;
    }
protected function formatField(Field $field)
    {
        $jsonKey = $field->column();

        $elementName = $elementClass = $errorKey = [];

        if (is_array($jsonKey)) {
            foreach ($jsonKey as $index => $name) {
                $elementName[$index] = "{$this->column}[$name]";
                $errorKey[$index] = "{$this->column}.$name";
                $elementClass[$index] = "{$this->column}_$name";
            }
        } else {
            $elementName = "{$this->column}[$jsonKey]";
            $errorKey = "{$this->column}.$jsonKey";
            $elementClass = "{$this->column}_$jsonKey";
        }

        $field->setElementName($elementName)
            ->setErrorKey($errorKey)
            ->setElementClass($elementClass);

        return $field;
    }
protected function formatField ( Field $ field ) { $ jsonKey = $ field -> column ( ) ; $ elementName = $ elementClass = $ errorKey = [ ] ; if ( is_array ( $ jsonKey ) ) { foreach ( $ jsonKey as $ index => $ name ) { $ elementName [ $ index ] = "{$this->column}[$name]" ; $ errorKey [ $ index ] = "{$this->column}.$name" ; $ elementClass [ $ index ] = "{$this->column}_$name" ; } } else { $ elementName = "{$this->column}[$jsonKey]" ; $ errorKey = "{$this->column}.$jsonKey" ; $ elementClass = "{$this->column}_$jsonKey" ; } $ field -> setElementName ( $ elementName ) -> setErrorKey ( $ errorKey ) -> setElementClass ( $ elementClass ) ; return $ field ; }
Format form, set `element name` `error key` and `element class`.

@param Field $field

@return Field
Format form set element name error key and element class .