src/fieldwork/Form.php
public function process ()
    {
        if ($this->isProcessed)
            return;
        $this->isProcessed = true;
        foreach ($this->getFields() as $field)
            /* @var $field Field */
            $field->preprocess();
        $this->isUserSubmitted = $this->getValue($this->getSubmitConfirmFieldName(), 'false') == 'true' || $this->forceSubmit;
        if ($this->isUserSubmitted) {
            foreach ($this->getFields() as $field)
                $field->restoreValue($this->method);

            $this->activateHandlers();

            if ($this->isValid()) {
                $this->submit();
            }
        }
    }
public function process ()
    {
        if ($this->isProcessed)
            return;
        $this->isProcessed = true;
        foreach ($this->getFields() as $field)
            /* @var $field Field */
            $field->preprocess();
        $this->isUserSubmitted = $this->getValue($this->getSubmitConfirmFieldName(), 'false') == 'true' || $this->forceSubmit;
        if ($this->isUserSubmitted) {
            foreach ($this->getFields() as $field)
                $field->restoreValue($this->method);

            $this->activateHandlers();

            if ($this->isValid()) {
                $this->submit();
            }
        }
    }
public function process ( ) { if ( $ this -> isProcessed ) return ; $ this -> isProcessed = true ; foreach ( $ this -> getFields ( ) as $ field ) /* @var $field Field */ $ field -> preprocess ( ) ; $ this -> isUserSubmitted = $ this -> getValue ( $ this -> getSubmitConfirmFieldName ( ) , 'false' ) == 'true' || $ this -> forceSubmit ; if ( $ this -> isUserSubmitted ) { foreach ( $ this -> getFields ( ) as $ field ) $ field -> restoreValue ( $ this -> method ) ; $ this -> activateHandlers ( ) ; if ( $ this -> isValid ( ) ) { $ this -> submit ( ) ; } } }
Check if form was activated, then validates, calls handlers, then submits. Call this function before displaying
the form.
Check if form was activated then validates calls handlers then submits . Call this function before displaying the form .