Callback for submit-button which should return true if it could
carry out its work and false if something failed.

@return boolean true if okey, false if something went wrong.
18851
public function callbackSubmit()
    {
        $id = $this->form->value("id");
        $this->di->get("userService")->deleteUser($id);
        $this->di->get("utils")->redirect("admin");
    }
241923
def submit_button(*args, **kwargs):
    '''
    
    '''
    submit_button = wtforms.SubmitField(*args, **kwargs)
    submit_button.input_type = 'submit_button'
    return submit_button
442555
public function callbackSubmit()
    {
        // Get values from the submitted form
        $email       = $this->form->value("email");

        if (strpos($email, '%') !== false) {
            $this->form->addOutput("% is not allowed");
            return false;
        }

          $user = $this->user;

          $user->email = $email;
          $user->authority = $this->form->value("select") ?: "user";
          $user->save();
          $this->form->addOutput("Du uppdaterade användaren");
          return true;
    }
982508
protected function submitFileManager()
    {
        if ($this->data_access) {
            if ($this->isPosted('process_selected')) {
                $this->submitSelectedFileManager();
            } else if ($this->isPosted('submit') && $this->validateFileManager()) {
                $this->submitCommandFileManager();
            }
        }
    }
1011192
public function callbackSubmit()
    {
        // Get values from the submitted form
        $name       = $this->form->value("user");
        $password      = $this->form->value("password");

        $user = new User();
        $user->setDb($this->di->get("db"));
        $res = $user->verifyPassword($name, $password);

        if (!$res) {
            $this->form->rememberValues();
            $this->form->addOutput("User or password did not match.");
            return false;
        }

        $this->di->get('session')->set("user", $name); # set user in session
        $this->di->get("response")->redirect("user/profile");
    }
24766
static function isFormSubmission() {

		if ( empty( $_REQUEST['page'] ) ) {
			return false;
		}

		if ( 'pb_export' !== $_REQUEST['page'] ) {
			return false;
		}

		if ( $_SERVER['REQUEST_METHOD'] === 'POST' ) {
			return true;
		}

		if ( count( $_GET ) > 1 ) {
			return true;
		}

		return false;
	}
462444
public function callbackSubmit()
    {
        // Get values from the submitted form
        $username       = $this->form->value("username");
        $password       = $this->form->value("password");

        // Connect to databse and se if user exists and if so compare password
        $user = new User();
        $user->setDb($this->di->get("db"));
        $res = $user->verifyPassword($username, $password);

        if (!$res) {
            $this->form->rememberValues();
            $this->form->addOutput("User or password did not match.");
            return false;
        }

        // Get the user
        $user->find("username", $username);

        // Check if user is deleted
        if (isset($user->deleted)) {
            $this->form->rememberValues();
            $this->form->addOutput("User is inactive. Contact administrator.");
            return false;
        }

        // Save user to session
        $this->di->get("session")->set("user_id", $user->id);
        $this->di->get("session")->set("username", $user->username);
        $this->di->get("session")->set("user_role", $user->role);

        // Redirect to profile page
        $this->di->get("response")->redirect($this->di->get("url")->create("comment"));
    }
528853
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;
    }
387566
public function isSuccessful()
    {
        $successful = false;

        $errorCode = $this->getErrorCode();
        if ($errorCode === 200 || $errorCode === 0) {
            $successful = true;
        }

        return $successful;
    }
475636
function is_cancelled(){
        $mform =& $this->_form;
        if ($mform->isSubmitted()){
            foreach ($mform->_cancelButtons as $cancelbutton){
                if (optional_param($cancelbutton, 0, PARAM_RAW)){
                    return true;
                }
            }
        }
        return false;
    }
1107220
public function wasSubmitted()
    {
        // If form was not (yet) populated, we can not use isChecked() so do this manually
        $request = $this->getRequest();
        if ($request->isPost() && strlen(trim($request->getPost($this->_submitFieldName)))) {
            return true;
        } else {
            return false;
        }
    }
1127204
public function isSubmitted()
    {
        $postParams = $this->request->getParsedBody();
        if(count($postParams)> 0)
        {
  
            $this->setFieldValues($postParams);  
        }
        return (count($postParams)> 0);
    }
292259
final public function send()
    {
        if (!Str::equalIgnoreCase($this->_sendMethod, App::$Request->getMethod())) {
            return false;
        }

        return $this->getRequest('submit', $this->_sendMethod) !== null;
    }
1213152
public function onSubmit()
    {
        /*
         * Save or reset search term in session
         */
        $this->setActiveTerm(post($this->getName()));

        /*
         * Trigger class event, merge results as viewable array
         */
        $params = func_get_args();
        $result = $this->fireEvent('search.submit', [$params]);
        if ($result && is_array($result)) {
            return call_user_func_array('array_merge', $result);
        }
    }
745727
function ()
    {
      // Set the new action for the submit button
      this.submitButton.off('click.jBox-Confirm' + this.id).on('click.jBox-Confirm' + this.id, function () { this.options.confirm ? this.options.confirm() : eval(this.source.data('jBox-Confirm-submit')); this.options.closeOnConfirm && this.close(); }.bind(this));
    }
928844
protected function validateForm()
    {
        if (2 == $this->currentStep) {
            return true;
        }
        // Note we use an MUtil_Form
        return $this->_form->isValid($this->formData, $this->disableValidatorTranslation);
    }
460010
public function submitLabel()
    {
        if ($this->submitLabel === null) {
            $this->submitLabel = $this->defaultSubmitLabel();
        }

        return $this->submitLabel;
    }