[TYPO3-project-formidable] Simpel Form Validation

Luc Muller l.mul-nospam-ler at ameos.com
Thu Apr 17 09:24:25 CEST 2008


You got the correct idea to check if everything is valid.

Try with this test, it should work the way you want

if($this->oForm->oDataHandler->_isFullySubmitted() && 
$this->oForm->oDataHandler->_allIsValid()) {
//is valid
}else{
//is not valid
}

Hope this help

Luc Muller

Christian Tauscher a écrit :
> If a form is submitted, then I the
> 
> PostVar:AMEOSFORMIDABLE_SUBMITTED == 1
> 
> but how can I ceck if everything is valid? There semms not to be a 
> Parameter and a method like $oForm->valid() is not given. So I have to 
> programm my own method for final validaton?
> 
> my code looks like this at the moment:
> 
> if($this->piVars['AMEOSFORMIDABLE_SUBMITTED'] == 1 &&
>     $this->vlidateForm())
>     {
>     $out = "Perfekt!";
>     }
> else
>     {
>     $this->oForm = t3lib_div::makeInstance("tx_ameosformidable");
>     $this->oForm->init(
>         $this,
>         "...formidable.xml");       
>     $out = $this->oForm->render();
>     }
> 
> 
> Method vlidateForm() checks again what formidable already has done.
> 
> Hope you know what I mean,
> 
> Christian.


More information about the TYPO3-project-formidable mailing list