src/Form/Form.php
public function setParam($key, $value)
    {
        if ($this->has($key)) {
            $this->get($key)->setValue($value);
        } else {
            $this->add(
                [
                    'type'       => 'hidden',
                    'name'       => $key,
                    'attributes' => [
                        'value' => $value
                    ]
                ]
            );
        }
        return $this;
    }
public function setParam($key, $value)
    {
        if ($this->has($key)) {
            $this->get($key)->setValue($value);
        } else {
            $this->add(
                [
                    'type'       => 'hidden',
                    'name'       => $key,
                    'attributes' => [
                        'value' => $value
                    ]
                ]
            );
        }
        return $this;
    }
Sets a form parameter.

@param string $key
@param string $value

@return self