core/Form.php
public function fillComplete(array $data)
    {
        $fields = $this->getFields();
        $valueFuncFields = [];
        foreach ($fields as $name => $field) {
            if ($field->close || ($field->offEdit && $this->type == 'edit')) {
                continue;
            }
            $valFunc = $field->getFunc('value');
            if (!empty($valFunc) && is_callable($valFunc)) {
                $valueFuncFields[] = $field;
            }
            if ($field->viewClose) {
                $field->value = $field->default;
                continue;
            }
            $box = Field::getInstance($field->type);
            if ($box == null) {
                $box = Field::getInstance('hidden');
            }
            $box->assign($field, $data);
            if ($field->forceDefault && !empty($field->default) && (is_string($field->value) || is_int($field->value) || is_double($field->value) || is_float($field->value) || is_array($field->value) || $field->value === null) && empty($field->value)) {
                $field->value = $field->default;
            }
        }
        foreach ($valueFuncFields as $field) {
            $valFunc = $field->getFunc('value');
            $field->value = call_user_func($valFunc, $this);
        }
        return $this->getValues();
    }
public function fillComplete(array $data)
    {
        $fields = $this->getFields();
        $valueFuncFields = [];
        foreach ($fields as $name => $field) {
            if ($field->close || ($field->offEdit && $this->type == 'edit')) {
                continue;
            }
            $valFunc = $field->getFunc('value');
            if (!empty($valFunc) && is_callable($valFunc)) {
                $valueFuncFields[] = $field;
            }
            if ($field->viewClose) {
                $field->value = $field->default;
                continue;
            }
            $box = Field::getInstance($field->type);
            if ($box == null) {
                $box = Field::getInstance('hidden');
            }
            $box->assign($field, $data);
            if ($field->forceDefault && !empty($field->default) && (is_string($field->value) || is_int($field->value) || is_double($field->value) || is_float($field->value) || is_array($field->value) || $field->value === null) && empty($field->value)) {
                $field->value = $field->default;
            }
        }
        foreach ($valueFuncFields as $field) {
            $valFunc = $field->getFunc('value');
            $field->value = call_user_func($valFunc, $this);
        }
        return $this->getValues();
    }
使用 数组填充
@param $data
@return array
@throws \Exception