code: 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;
      }
docs: Sets a form parameter.
  
  @param string $key
  @param string $value
  
  @return self