src/Form.php
public function addField($name, $decorator = null, $field = null)
    {
        if (!$this->model) {
            $this->model = new \atk4\ui\misc\ProxyModel();
        }

        return $this->layout->addField($name, $decorator, $field);
    }
public function addField($name, $decorator = null, $field = null)
    {
        if (!$this->model) {
            $this->model = new \atk4\ui\misc\ProxyModel();
        }

        return $this->layout->addField($name, $decorator, $field);
    }
public function addField ( $ name , $ decorator = null , $ field = null ) { if ( ! $ this -> model ) { $ this -> model = new \ atk4 \ ui \ misc \ ProxyModel ( ) ; } return $ this -> layout -> addField ( $ name , $ decorator , $ field ) ; }
Add field into current layout. If no layout, create one. If no model, create blank one.

@param string|null              $name
@param array|string|object|null $decorator
@param array|string|object|null $field

@return FormField\Generic
Add field into current layout . If no layout create one . If no model create blank one .