[TYPO3-project-formidable] How to use validator without submit button

news at das-rad-ruft.de news at das-rad-ruft.de
Thu Feb 12 12:35:23 CET 2009



Hi,

> In my case, I don't use a submit button, but a simple
button with an ajax
> event.
> 
> So, it was
possible to call validator in my ajax event?

there's a function
tx_ameosformidable::_validateElement which you may call in your ajax
callback. If there's an error add a message to the array
_aValidationErrors[]

The messages were only displayed after
submit, but maybe there's a api function for displaying it without the
submit. I'm using only in one case a custom validation with the api
functions (but with a submit button thus I can't give an answer to the
display of the error messages without submit).

regards,
 dietmar





More information about the TYPO3-project-formidable mailing list