Step B form submit
764725
public function submitForm(array &$form, FormStateInterface $form_state)
    {
        $node   = &$form_state->getTemporaryValue('node');
        $sites  = &$form_state->getTemporaryValue('sites');
        $siteId = &$form_state->getValue('site');

        $this->nodeManager->createReference($sites[$siteId], $node);

        drupal_set_message($this->t("%title has been added to site %site", [
            '%title'  => $node->title,
            '%site'   => $sites[$siteId]->title,
        ]));

        $form_state->setRedirect('node/' . $node->nid);
    }
108412
public function submitForm(array &$form, FormStateInterface $form_state)
    {
        $node   = $form_state->getTemporaryValue('node');
        $action = $form_state->getValue('action');
        $siteId = $form_state->getValue('site');

        $options = [];
        if (isset($_GET['destination'])) {
            $options['query']['destination'] = $_GET['destination'];
            unset($_GET['destination']);
        }

        switch ($action) {

            case 'duplicate':
                list($path, $options) = $this->siteManager->getUrlGenerator()->getRouteAndParams($siteId, 'node/' . $node->id(). '/clone', $options);
                drupal_set_message($this->t("You can now edit this node on this site, it will be automatically duplicated."));
                break;

            default:
                $path = 'node/' . $node->id() . '/edit';
                drupal_set_message($this->t("You are now editing the global content for all sites."));
                break;
        }

        $form_state->setRedirect($path, $options);
    }
101026
function _submit(){
			// execute the request and use the metadata if available

			if (that.bUseBatch) {
				that.updateSecurityToken();
				// batch requests only need the path without the service URL
				// extract query of url and combine it with the path...
				var sUriQuery = URI.parse(oRequest.requestUri).query;
				//var sRequestUrl = sPath.replace(/\/$/, ""); // remove trailing slash if any
				//sRequestUrl += sUriQuery ? "?" + sUriQuery : "";
				var sRequestUrl = that._createRequestUrl(sPath, null, sUriQuery, that.bUseBatch);
				oRequest = that._createRequest(sRequestUrl, "GET", true);
				var oBatchRequest = that._createBatchRequest([oRequest],true);
				oRequestHandle = that._request(oBatchRequest, _handleSuccess, _handleError, OData.batchHandler, undefined, that.getServiceMetadata());
			} else {
				oRequestHandle = that._request(oRequest, _handleSuccess, _handleError, that.oHandler, undefined, that.getServiceMetadata());
			}

			if (fnHandleUpdate) {
				// Create a wrapper for the request handle to be able to differentiate
				// between intentionally aborted requests and failed requests
				var oWrappedHandle = {
					abort: function() {
						oRequestHandle.bAborted = true;
						oRequestHandle.abort();
					}
				};
				fnHandleUpdate(oWrappedHandle);
			}
		}
71480
public function navButtonSubmit(array &$form, FormStateInterface &$form_state) {
    $storage = $form_state->getStorage();
    // Save steps values to storage.
    if ($form_state->getValue('location')) {
      $storage['location'] = $form_state->getValue('location');
    }
    if ($form_state->getValue('type')) {
      $storage['type'] = $form_state->getValue('type');
    }
    $form_state->setStorage($storage);
    $form_state->setRebuild();
  }
294518
def render_next_step(self, form, **kwargs):
        
        # get the form instance based on the data from the storage backend
        # (if available).
        next_step = self.steps.next
        new_form = self.get_form(next_step,
            data=self.storage.get_step_data(next_step),
            files=self.storage.get_step_files(next_step))

        # change the stored current step
        self.storage.current_step = next_step
        return self.render(new_form, **kwargs)
247497
public function callbackSubmit()
    {
        $this->AddOutput("<p>DoSubmit(): Form was submitted.<p>");
        $this->AddOutput("<p>Do stuff (save to database) and return true (success) or false (failed processing)</p>");
        $this->AddOutput("<p><b>Name: " . $this->Value('name') . "</b></p>");
        $this->AddOutput("<p><b>Email: " . $this->Value('email') . "</b></p>");
        $this->AddOutput("<p><b>Phone: " . $this->Value('phone') . "</b></p>");
        $this->saveInSession = true;
        return true;
    }
818344
public function actionSubmit()
    {
        $rr = new RequestResponse();

        if (\Yii::$app->request->isAjax && !\Yii::$app->request->isPjax) {
            if (\Yii::$app->request->post('sx-model') && \Yii::$app->request->post('sx-model-value')) {
                $modelClass = \Yii::$app->request->post('sx-model');
                $modelValue = \Yii::$app->request->post('sx-model-value');
                /**
                 * @var RelatedElementModel    $modelForm
                 * @var Form2FormSend          $modelFormSend
                 * @var RelatedPropertiesModel $validateModel
                 * @var Form2Form              $modelForm
                 */
                $modelForm = $modelClass::find()->where(['id' => $modelValue])->one();
                $modelFormSend = $modelForm->createModelFormSend();
                $modelFormSend->cms_site_id = \Yii::$app->cms->site->id;
                $modelFormSend->utms = (array)\Yii::$app->seo->utms;
                $modelFormSend->page_url = \Yii::$app->request->referrer;

                $validateModel = $modelFormSend->relatedPropertiesModel;

                $modelFormSend->data_values = $validateModel->toArray($validateModel->attributes());
                $modelFormSend->data_labels = $validateModel->attributeLabels();
                $modelFormSend->emails = $modelForm->emails;
                $modelFormSend->phones = $modelForm->phones;


                if ($validateModel->load(\Yii::$app->request->post()) && $validateModel->validate()) {
                    if ($this->_beforeSave($modelForm, $validateModel, $modelFormSend)) {
                        if (!$modelFormSend->save()) {
                            $rr->success = false;
                            $rr->message = \Yii::t('skeeks/form2/app', 'Failed to send the form');
                            return (array)$rr;
                        }

                        $validateModel->save();
                        $modelFormSend->notify();

                        $this->_afterSave($modelForm, $validateModel, $modelFormSend);

                        $rr->success = true;
                        $rr->message = \Yii::t('skeeks/form2/app', 'Successfully sent');
                    } else {
                        $rr->success = false;
                        $rr->message = \Yii::t('skeeks/form2/app', 'Check the correctness of filling the form fields');
                    }

                } else {
                    $rr->success = false;
                    $rr->message = \Yii::t('skeeks/form2/app', 'Check the correctness of filling the form fields');
                }

                return (array)$rr;
            }
        }
    }
200175
function onSubmit(vRequest) {
			if (Array.isArray(vRequest)) {
				vRequest.forEach(onSubmit);
			} else if (vRequest.$submit) {
				vRequest.$submit();
			}
		}
769611
void submit() {

        try {
            CmsProject project = m_context.getCms().readProject((CmsUUID)m_projectComboBox.getValue());
            if (!m_context.getCms().getRequestContext().getCurrentProject().equals(project)) {
                A_CmsUI.get().changeProject(project);
            } else {
                project = null;
            }
            String siteRoot = (String)m_siteComboBox.getValue();
            if (!m_context.getCms().getRequestContext().getSiteRoot().equals(siteRoot)) {
                A_CmsUI.get().changeSite(siteRoot);
            } else {
                siteRoot = null;
            }
            if ((siteRoot != null) && CmsFileExplorerConfiguration.APP_ID.equals(m_context.getAppId())) {
                I_CmsWorkplaceAppConfiguration editorConf = OpenCms.getWorkplaceAppManager().getAppConfiguration(
                    CmsPageEditorConfiguration.APP_ID);
                if (editorConf.getVisibility(m_context.getCms()).isActive()) {
                    ((I_CmsHasAppLaunchCommand)editorConf).getAppLaunchCommand().run();
                    return;
                }
            }
            m_context.finish(project, siteRoot);
        } catch (CmsException e) {
            m_context.error(e);
        }
    }
233604
function maybeUploadOnSubmit(formEl) {
        var nativeSubmit = formEl.submit;

        // Intercept and squelch submit events.
        qq(formEl).attach("submit", function(event) {
            event = event || window.event;

            if (event.preventDefault) {
                event.preventDefault();
            }
            else {
                event.returnValue = false;
            }

            validateForm(formEl, nativeSubmit) && startUpload();
        });

        // The form's `submit()` function may be called instead (i.e. via jQuery.submit()).
        // Intercept that too.
        formEl.submit = function() {
            validateForm(formEl, nativeSubmit) && startUpload();
        };
    }
1320555
function doSubmit() {
            // make sure form attrs are set
            var t = $form.attr('target'), a = $form.attr('action');

            // update form attrs in IE friendly way
            form.setAttribute('target',id);
            if (!method) {
                form.setAttribute('method', 'POST');
            }
            if (a != s.url) {
                form.setAttribute('action', s.url);
            }

            // ie borks in some cases when setting encoding
            if (! s.skipEncodingOverride && (!method || /post/i.test(method))) {
                $form.attr({
                    encoding: 'multipart/form-data',
                    enctype:  'multipart/form-data'
                });
            }

            // support timout
            if (s.timeout) {
                timeoutHandle = setTimeout(function() { timedOut = true; cb(CLIENT_TIMEOUT_ABORT); }, s.timeout);
            }
            
            // look for server aborts
            function checkState() {
                try {
                    var state = getDoc(io).readyState;
                    log('state = ' + state);
                    if (state && state.toLowerCase() == 'uninitialized')
                        setTimeout(checkState,50);
                }
                catch(e) {
                    log('Server abort: ' , e, ' (', e.name, ')');
                    cb(SERVER_ABORT);
                    if (timeoutHandle)
                        clearTimeout(timeoutHandle);
                    timeoutHandle = undefined;
                }
            }

            // add "extra" data to form if provided in options
            var extraInputs = [];
            try {
                if (s.extraData) {
                    for (var n in s.extraData) {
                        if (s.extraData.hasOwnProperty(n)) {
                            extraInputs.push(
                                $('<input type="hidden" name="'+n+'">').attr('value',s.extraData[n])
                                    .appendTo(form)[0]);
                        }
                    }
                }

                if (!s.iframeTarget) {
                    // add iframe to doc and submit the form
                    $io.appendTo('body');
                    if (io.attachEvent)
                        io.attachEvent('onload', cb);
                    else
                        io.addEventListener('load', cb, false);
                }
                setTimeout(checkState,15);
                form.submit();
            }
            finally {
                // reset attrs and remove "extra" input elements
                form.setAttribute('action',a);
                if(t) {
                    form.setAttribute('target', t);
                } else {
                    $form.removeAttr('target');
                }
                $(extraInputs).remove();
            }
        }
640641
function process_form($formdata) {
        global $USER;

        $this->columns = array();
        if (!empty($formdata->itemids)) {
            if ($formdata->itemids=='-1') {
                //user deselected all items
            } else {
                foreach ($formdata->itemids as $itemid=>$selected) {
                    if ($selected and array_key_exists($itemid, $this->grade_items)) {
                        $this->columns[$itemid] =& $this->grade_items[$itemid];
                    }
                }
            }
        } else {
            foreach ($this->grade_items as $itemid=>$unused) {
                $this->columns[$itemid] =& $this->grade_items[$itemid];
            }
        }

        if (isset($formdata->key)) {
            if ($formdata->key == 1 && isset($formdata->iprestriction) && isset($formdata->validuntil)) {
                // Create a new key
                $formdata->key = create_user_key('grade/export', $USER->id, $this->course->id, $formdata->iprestriction, $formdata->validuntil);
            }
            $this->userkey = $formdata->key;
        }

        if (isset($formdata->decimals)) {
            $this->decimalpoints = $formdata->decimals;
        }

        if (isset($formdata->export_letters)) {
            $this->export_letters = $formdata->export_letters;
        }

        if (isset($formdata->export_feedback)) {
            $this->export_feedback = $formdata->export_feedback;
        }

        if (isset($formdata->export_onlyactive)) {
            $this->onlyactive = $formdata->export_onlyactive;
        }

        if (isset($formdata->previewrows)) {
            $this->previewrows = $formdata->previewrows;
        }

        if (isset($formdata->display)) {
            $this->displaytype = $formdata->display;

            // Used by grade exports which accept multiple display types.
            // If the checkbox value is 0 (unchecked) then remove it.
            if (is_array($formdata->display)) {
                $this->displaytype = array_filter($formdata->display);
            }
        }

        if (isset($formdata->updatedgradesonly)) {
            $this->updatedgradesonly = $formdata->updatedgradesonly;
        }
    }
854629
def submit(label, *args)
      options = args.extract_options!
      new_class = options[:class] || "btn btn-primary"
      @template.content_tag("div",
        super(label, *(args << options.merge(:class => new_class))), :class => "form-actions")
    end
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);
    }
240644
void submit() {

        if (isValid()) {
            if (m_project == null) {
                createProject();
            } else {
                saveProject();
            }
            m_table.loadProjects();
            m_window.close();
        }
    }
840912
function getSubmitBtnChildren(formEl) {
          var submitBtnEls = [];
          var allButtonEls = formEl.find(angularPromiseButtons.config.BTN_SELECTOR);

          for (var i = 0; i < allButtonEls.length; i++) {
            var btnEl = allButtonEls[i];
            if (angular.element(btnEl)
              .attr('type') === 'submit') {
              submitBtnEls.push(btnEl);
            }
          }
          return angular.element(submitBtnEls);
        }
898002
function () {
            if (this.validate()) {
                if (this.beforeSubmitEvent.fire()) {
                    this.doSubmit();
                    this.submitEvent.fire();
    
                    if (this.cfg.getProperty("hideaftersubmit")) {
                        this.hide();
                    }
    
                    return true;
                } else {
                    return false;
                }
            } else {
                return false;
            }
        }