Check if the form was posted
11759
public function posted($method = 'post')
    {
        $postIndicator = $this->getPostIndicator();

        if ($postIndicator->posted($method)) {
            if ($method == 'post') {
                $this->setValues($_POST, $_FILES);
            } else if ($method == 'get') {
                $this->setValues($_GET);
            }
            return true;
        }

        return false;
    }
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;
	}
846590
def checkform (form, env):
    """"""
    # check lang support
    if "language" in form:
        lang = formvalue(form, 'language')
        if lang in _supported_langs:
            localestr = lang_locale[lang]
            try:
                # XXX this is not thread-safe, so think of something else
                locale.setlocale(locale.LC_ALL, localestr)
                init_i18n()
            except locale.Error as errmsg:
                log(env, "could not set locale %r: %s" % (localestr, errmsg))
        else:
            raise LCFormError(_("unsupported language %r") % lang)
    # check url syntax
    if "url" in form:
        url = formvalue(form, "url")
        if not url or url == "http://":
            raise LCFormError(_("empty url was given"))
        if not urlutil.is_safe_url(url):
            raise LCFormError(_("disallowed url %r was given") % url)
    else:
        raise LCFormError(_("no url was given"))
    # check recursion level
    if "level" in form:
        level = formvalue(form, "level")
        if not _is_level(level):
            raise LCFormError(_("invalid recursion level %r") % level)
    # check options
    for option in ("anchors", "errors", "intern"):
        if option in form:
            value = formvalue(form, option)
            if value != "on":
                raise LCFormError(_("invalid %s option %r") % (option, value))
726201
function searchFormSubmitted(e){
    e = e || window.event;
    e.preventDefault();

    // If there's no selected item, do nothing
    if(!selectedItem) return false;

    // Otherwise, jump to the page
    window.location.href = relativeDir + selectedItem.getAttribute('data-value');

    return false;
  }
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;
    }
1027602
def see_form(self, url):
    

    elements = ElementSelector(
        world.browser,
        str('//form[@action="%s"]' % url),
        filter_displayed=True,
    )
    if not elements:
        raise AssertionError("Expected form not found.")
849615
def post(self, request, **kwargs):
        
        forms = self.get_forms()
        if self.are_forms_valid(forms):
            return self.forms_valid(forms)
        else:
            return self.forms_invalid(forms)
825550
protected function checkIfNamedForm()
    {
        if ($this->getFormOption('name')) {
            $this->name = array_pull($this->formOptions, 'name', $this->name);
        }
    }
1118872
function get_data() {
        $mform =& $this->_form;

        if (!$this->is_cancelled() and $this->is_submitted() and $this->is_validated()) {
            $data = $mform->exportValues();
            unset($data['sesskey']); // we do not need to return sesskey
            unset($data['_qf__'.$this->_formname]);   // we do not need the submission marker too
            if (empty($data)) {
                return NULL;
            } else {
                return (object)$data;
            }
        } else {
            return NULL;
        }
    }
1090642
def is_done(self, submissionid_or_submission, user_check=True):
        
        # TODO: not a very nice way to avoid too many database call. Should be refactored.
        if isinstance(submissionid_or_submission, dict):
            submission = submissionid_or_submission
        else:
            submission = self.get_submission(submissionid_or_submission, False)
        if user_check and not self.user_is_submission_owner(submission):
            return None
        return submission["status"] == "done" or submission["status"] == "error"
1025863
function get_submitted_data() {
        $mform =& $this->_form;

        if ($this->is_submitted()) {
            $data = $mform->exportValues();
            unset($data['sesskey']); // we do not need to return sesskey
            unset($data['_qf__'.$this->_formname]);   // we do not need the submission marker too
            if (empty($data)) {
                return NULL;
            } else {
                return (object)$data;
            }
        } else {
            return NULL;
        }
    }
374287
public function is_submitted() {
		$data = uix()->request_vars( 'post' );

		return isset( $data[ 'uixNonce_' . $this->id() ] ) && wp_verify_nonce( $data[ 'uixNonce_' . $this->id() ], $this->id() );
	}
1212863
def read_form_data(self):
        """"""
        if self.processed_data:
            raise exceptions.AlreadyProcessed('The data has already been processed for this form')
        
        if self.readonly:
            return

        if request.method == self.method:
            if self.method == 'POST':
                data = request.form
            else:
                data = request.args

            if self.submitted_hidden_input_name in data:
                # The form has been submitted
                self.processed_data = True

                for field in self.all_fields:
                    # We need to skip readonly fields
                    if field.readonly:
                        pass
                    else:
                        field.extract_value(data)

                        # Validate the field
                        if not field.validate():
                            log.debug('Validation error in field \'%s\': %s' % (field.name, field.error))
                            self.has_errors = True
321090
def form_valid(self, form):
        
        self.object = form.save(commit=False)
        self.pre_save()
        self.object.save()
        if hasattr(form, 'save_m2m'):
            form.save_m2m()
        self.post_save()

        if self.request.is_ajax():
            return self.render_json_response(self.get_success_result())
        return HttpResponseRedirect(self.get_success_url())
514684
def check_submission(self, submission_string, submission_id):
        
        if self.question_upload_type == STRING:
            return self.question_answer_string.lower().replace(' ', '') == submission_string.lower().replace(' ', '')
        else:
            raise Exception("Question not String Type.")
1251439
static function isFormSubmission() {

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

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

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

		if ( static::isCurrentAction( 'add' ) || static::isCurrentAction( 'remove' ) ) {
			return true;
		}

		return false;
	}
845581
function is_validated() {
        //finalize the form definition before any processing
        if (!$this->_definition_finalized) {
            $this->_definition_finalized = true;
            $this->definition_after_data();
        }

        return $this->validate_defined_fields();
    }