code: private function addWidgetToForm($node, $form, $enclosing_label)
      {
          $widget = $this->tags()->createTag($node->name, $this->attributes($node));
          if (! $widget) {
              return;
          }
          $widget->setLabel($enclosing_label)
                 ->addContent($this->innerHtml($node));
          if ($node->name == 'select') {
              $widget->addTags($this->collectSelectOptions($node));
          }
          $form->addWidget($widget);
          $this->indexWidgetById($widget);
      }
docs: Adds the widget into the form container.
  
  @param object $node             Tidy XML node of widget.
  @param SimpleForm $form         Form to add it to.
  @param string $enclosing_label  The label of any label tag we might be in.