code: public function addWidget($tag)
      {
          if (strtolower($tag->getAttribute('type')) === 'submit') {
              $this->buttons[] = $tag;
          } elseif (strtolower($tag->getAttribute('type')) === 'image') {
              $this->images[] = $tag;
          } elseif ($tag->getName()) {
              $this->setWidget($tag);
          }
      }
docs: Adds a tag contents to the form.
  
  @param SimpleWidget $tag        Input tag to add.