public function wasSubmitted()
    {
        $formMethod = strtoupper($this->getAttribute('method', 'post'));
        $formId = $this->getRequest()->getPost('form-id', false);
        $formId = $formId
            ? $formId
            : $this->getRequest()->getQuery('form-id', null);

        $submitted = $this->request->getMethod() == $formMethod &&
            $formId == $this->getId();
        if ($submitted) {
            $this->updateValuesFromRequest();
        }
        return $submitted;
    }