'Handle the form tags.
This method also looks if there are "pending inputs" in the
self._saved_inputs list and parses them.'

def _handle_form_tag_start(self, tag, tag_name, attrs):

    SGMLParser._handle_form_tag_start(self, tag, tag_name, attrs)
    method = attrs.get('method', 'GET').upper()
    action = attrs.get('action', None)
    form_encoding = attrs.get('enctype', DEFAULT_FORM_ENCODING)
    autocomplete = attrs.get('autocomplete', None)
    if (action is None):
        action = self._source_url
    else:
        action = self._decode_url(action)
        try:
            action = self._base_url.url_join(action, encoding=self._encoding)
        except ValueError:
            action = self._source_url
    form_params = FormParameters(encoding=self._encoding, method=method, action=action, form_encoding=form_encoding, attributes=attrs, hosted_at_url=self._source_url)
    form_params.set_autocomplete(autocomplete)
    self._forms.append(form_params)
    for input_attrs in self._saved_inputs:
        self._handle_input_tag_inside_form(tag, 'input', input_attrs)
    self._saved_inputs = []
