/**
  * @param string $id Form identifier
  * @param HttpUrl $action form action (url to which it will be sumbitted); may be null
  * @param RequestMethod $method action method, default is get
  */
 function __construct($id, HttpUrl $action, RequestMethod $method = null)
 {
     Assert::isScalar($id);
     $this->id = $id;
     $this->action = $action;
     $this->method = $method ? $method : RequestMethod::get();
     $this->enctype = new FormEnctype(FormEnctype::ENCODED);
 }