Submit the form that was selected with :func:`select_form`.

        :return: Forwarded from :func:`Browser.submit`.

        If there are multiple submit input/button elements, passes ``btnName``
        to :func:`Form.choose_submit` on the current form to choose between
        them. If `update_state` is False, form will be submited but the browser
        state will remain unchanged. This is useful for forms that result in
        a download of a file. All other arguments are forwarded to
        :func:`Browser.submit`.

def submit_selected(self, btnName=None, update_state=True,
                        *args, **kwargs):
        """Submit the form that was selected with :func:`select_form`.

        :return: Forwarded from :func:`Browser.submit`.

        If there are multiple submit input/button elements, passes ``btnName``
        to :func:`Form.choose_submit` on the current form to choose between
        them. If `update_state` is False, form will be submited but the browser
        state will remain unchanged. This is useful for forms that result in
        a download of a file. All other arguments are forwarded to
        :func:`Browser.submit`.
        """
        self.get_current_form().choose_submit(btnName)

        referer = self.get_url()
        if referer is not None:
            if 'headers' in kwargs:
                kwargs['headers']['Referer'] = referer
            else:
                kwargs['headers'] = {'Referer': referer}

        resp = self.submit(self.__state.form, url=self.__state.url,
                           *args, **kwargs)
        if update_state:
            self.__state = _BrowserState(page=resp.soup, url=resp.url,
                                         request=resp.request)
        return resp