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.
346385
public function callbackSubmit()
    {
        // Get values from the submitted form
        $password      = $this->form->value("password");
        $passwordAgain = $this->form->value("password-again");


        // Check password matches
        if ($password !== $passwordAgain) {
            $this->form->rememberValues();
            $this->form->addOutput("Lösenorden är ej identiska.");
            return false;
        }

        // Create a new user.
        $user = new User();
        $user->username = $this->form->value("username");
        $user->firstname = $this->form->value("firstname");
        $user->lastname = $this->form->value("lastname");
        $user->email = $this->form->value("email");
        $user->password = $user->hashPassword($password);
        $user->enabled = 1;
        $user->administrator = 0;

        try {
            // Save user
            $this->di->get("userService")->createUser($user);
        } catch (\Peto16\User\Exception $e) {
            $this->form->addOutput($e->getMessage());
            return false;
        }

        $this->form->addOutput("Användare skapad.");
        return true;
    }
680142
public function processValue()
    {
        $form = $this->getForm();

        if ($form->getHiddenField($this->id . '_submitted') === null) {
            return false;
        }

        $data = &$form->getFormData();

        if (isset($data[$this->id])) {
            // get selected page id, strip off this id prefix
            $this->selected_page = mb_substr(
                $data[$this->id],
                mb_strlen($this->id) + 1
            );
        } else {
            $this->selected_page = null;
        }

        return true;
    }
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));
    }
701646
public function callbackSubmit()
    {
        // Get values from the submitted form
        $name       = $this->form->value("user");
        $answer      = $this->form->value("answer");
        $user = new User();
        $user->setDb($this->di->get("db"));
        $res = $user->verifyQuestion($name, $answer);
        if ($res) {
            $this->form->rememberValues();
            $random = substr(md5(mt_rand()), 0, 7);
            $this->form->addOutput("Rätt! Ditt lösenord har ändrats till <b>'{$random}'</b>.
             Ange det när du loggar in och byt sedan till valfritt i din profilsida.");
            $user->setPassword($random);
            $user->save();
            return true;
        }
        $this->form->rememberValues();
        $this->form->addOutput("Du hade fel, kontrollera så du inte skriver med stora bokstäver");
        return false;
    }
772627
public function handleCallbackStatus() {
    // Read the body of the request
    $body = @file_get_contents('php://input');

    if ($body != null && strlen(trim($body)) > 0) {
      $status = json_decode(trim($body), false);

      if ($status != null && is_object($status)) {
        $this->initStatus($status);

        return true;
      }
    }

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

        // Check password matches
        if ($password == null) {
            $this->form->rememberValues();
            $this->form->addOutput("Du angav aldrig ett lösenord");
            return false;
        }

        // Check password matches
        if ($password !== $passwordAgain) {
            $this->form->rememberValues();
            $this->form->addOutput("Lösenordet matchade ej");
            return false;
        }

        $this->user->setPassword($password);
        $this->user->save();
        $this->form->addOutput("<p>Du ändrade ditt lösenord!</p>
        <p>TIPS:Innan du loggar ut, kontrollera så din kontrollfråga stämmer ifall du glömmer bort</p>");
        return true;
    }
1035649
public function formSubmitSuccess()
    {
        return $this->form->js(null, $this->js()->trigger('reload'))
            ->univ()->closeDialog();
    }
504807
def handle_submit(self):
        
        wst_uid = self.request.form.get("getWorksheetTemplate")
        if not wst_uid:
            return False

        layout = self.context.getLayout()
        wst = api.get_object_by_uid(wst_uid)

        self.request["context_uid"] = api.get_uid(self.context)
        self.context.applyWorksheetTemplate(wst)

        if len(self.context.getLayout()) == len(layout):
            return False
        return True
1068941
private function submit ()
    {
        foreach ($this->getFields() as $field)
            /* @var $field Field */
            $field->submit();
        $this->isCallbacksubmitted = true;
        foreach ($this->callback as $callback)
            if (is_callable($callback))
                call_user_func($callback, $this);
    }
1127204
public function isSubmitted()
    {
        $postParams = $this->request->getParsedBody();
        if(count($postParams)> 0)
        {
  
            $this->setFieldValues($postParams);  
        }
        return (count($postParams)> 0);
    }
1040409
public function validate()
    {
        $this->resetResult();
        if ($this->getEnabled()) {
            $this->php($this->form->getData());
        }
        return $this->result;
    }
982508
protected function submitFileManager()
    {
        if ($this->data_access) {
            if ($this->isPosted('process_selected')) {
                $this->submitSelectedFileManager();
            } else if ($this->isPosted('submit') && $this->validateFileManager()) {
                $this->submitCommandFileManager();
            }
        }
    }
227307
public function callbackSubmit()
    {
        // Get values from the submitted form
        $name       = $this->form->value("name");
        $email       = $this->form->value("email");
        $question       = $this->form->value("question");
        $password      = $this->form->value("password");
        $passwordAgain = $this->form->value("password-again");

        // Check password matches
        if ($password !== $passwordAgain) {
            $this->form->rememberValues();
            $this->form->addOutput("Password did not match.");
            return false;
        }

        if (preg_match("/[^-a-z0-9_]/i", $name)) {
            $this->form->addOutput("Ogiltigt användarnamn, vänligen försök igen.");
            return false;
        }

         $user = new User();
         $user->setDb($this->di->get("db"));

        if ($user->userExists($name)) {
             $this->form->addOutput("User already exists");
             return false;
        }

          $user->name = $name;
          $user->email = $email;
          $user->question = $question;
          $user->setPassword($password);
          $user->save();

          $this->di->get('session')->set("user", $name); # set user in session
          $this->di->get("response")->redirect("user/profile");
    }
1129947
public function isValidCallbackRequest()
    {
        if (!$this->isValidHubSignature()) {
            return false;
        }

        $decoded = $this->getDecodedBody();

        $object = isset($decoded['object']) ? $decoded['object'] : null;
        $entry = isset($decoded['entry']) ? $decoded['entry'] : null;

        return $object === 'page' && null !== $entry;
    }
872126
protected function generateSubmitButton()
	{
		$args = $this->args['submit'];

		is_array( $args ) ?: $args = ['text' => $args ];

		$args = shortcode_atts([
			'text' => __( 'Save Changes', 'site-reviews' ),
			'type' => 'primary',
			'name' => 'submit',
			'wrap' => true,
			'other_attributes' => null,
		], $args );

		if( is_admin() ) {
			ob_start();
			submit_button( $args['text'], $args['type'], $args['name'], $args['wrap'], $args['other_attributes'] );
			return ob_get_clean();
		}
	}
215792
protected function submitEditCheckout()
    {
        $this->setSubmitted('order');

        $this->setAddressFormCheckout();
        $this->submitAddAddressCheckout();

        if ($this->isPosted('checkout_login') && empty($this->uid)) {
            $this->show_login_form = true;
        }

        $this->same_payment_address = (bool) $this->getPosted('same_payment_address', true, false, 'bool');

        if ($this->isPosted('update')) {
            $this->setMessage($this->text('Form has been updated'), 'success', false);
        }

        $this->submitLoginCheckout();

        if ($this->isPosted('checkout_anonymous')) {
            $this->show_login_form = false;
        }

        $this->validateCouponCheckout();
        $this->submitCartCheckout();
        $this->submitOrderCheckout();
    }
491906
public function callbackSubmit()
    {
        // Get values from the submitted form
        $text = $this->form->value("text");

        if (!$this->di->get('session')->has("user")) {
            $this->form->addOutput("Du behöver logga in");
            return false;
        }

        $user = new User($this->di->get("db"));
        if ($user->controlAuthority($this->di->get('session')->get("user"), $this->post->user) != true) {
            $this->form->addOutput("Du får inte redigera denna.");
            return false;
        }

        if ($text == "") {
            $this->form->addOutput("Du skrev aldrig något. Skriv gärna något.");
            return false;
        }

        $this->post->text = $text;
        $this->post->save();
        $this->form->addOutput("Du har uppdaterat inlägget");
        return true;
    }