private function processSubmit()
    {
        $this->debug->group(__METHOD__);
        $this->debug->groupUncollapse();
        $cfg = &$this->cfg;
        $status = &$this->status;
        if ($status['submitted']) {
            $this->validate();
            if (\is_callable($cfg['post'])) {
                $return = \call_user_func($cfg['post'], $this);
                if ($return === false) {
                    $status['error'] = true;
                }
                // $this->updateInvalid();
            }
            if ($status['error']) {
                // $this->debug->log('status[error]', $status['error']);
                $this->alerts->add($cfg['messages']['errorAlert']);
            } elseif ($invalidFields = $this->getInvalidFields()) {
                // $this->debug->log('invalidFields', $invalidFields);
                $alert = $cfg['messages']['invalidAlert'];
                foreach ($invalidFields as $field) {
                    if (!\strlen($field->attribs['value'])) {
                        $alert = $cfg['messages']['unansweredAlert'];
                        break;
                    }
                }
                $this->alerts->add($alert);
            } else {
                $this->debug->info('completed ', $status['currentPageName']);
                $this->persist->set('currentPage.completed', true);
                $this->addRemovePages();
                if ($this->persist->pageCount(true) == $this->persist->pageCount()) {
                    $this->debug->info('completed all pages');
                    $status['completed'] = true;
                    $complete = new Complete($this);
                    $return = $complete->complete();
                    if ($return === false) {
                        $status['error'] = true;
                    } elseif (\is_string($return)) {
                        $cfg['messages']['completed'] = $return;
                    }
                    if ($status['error']) {
                        $this->alerts->add($this->cfg['messages']['errorAlert']);
                    } else {
                        $this->alerts->add($this->cfg['messages']['completedAlert']);
                    }
                    if ($this->status['completed'] && $cfg['trashOnComplete']) {
                        $this->debug->warn('shutting this whole thing down');
                        $this->persist->remove();
                    }
                } else {
                    $this->debug->info('more pages to go');
                    $nextI = $this->persist->get('nextI');
                    $this->setCurrentFields($nextI);
                }
            }
        }
        $this->debug->groupEnd();
    }