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

Jerome Schneider typo3dev at ameos.com
Tue Nov 18 11:12:17 CET 2008


Hi Christian,

You can use

if($this->oDataHandler->_isSubmitted() && 
$this->oDataHandler->_allIsValid())

Cordialement,
Jerome Schneider

Christian Lerrahn a écrit :
> 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