[TYPO3-project-formidable] Checking for validity of data

Christian Lerrahn typo3 at penpal4u.net
Tue Nov 18 07:08:23 CET 2008


Hi,
if I use FORMidable in my plugin, how am I supposed to check if the
data was submitted and valid or if the form needs to be rendered again?

Currently I check like

$data = $this->oForm->_getRawPost();
$form = $this->oForm->render();
if (!empty($data) && empty($this->oForm->_aValidationErrors)) { ... }

However, this doesn't look very elegant and I'm wondering if there is
not a wrapper to _getRawPost() that would only return values if all
values were valid. I skimmed through the API doxygen documentation but
couldn't find anything. Is there such a wrapper function?

Cheers,
Christian


More information about the TYPO3-project-formidable mailing list