[TYPO3-english] Extbase + Ajax Form Submit + Validation

Jan Bednarik info at bednarik.org
Wed Mar 25 20:54:40 CET 2015


errorAction is called in case of error. You can redefine it:

	 * Name of the special error action method which is called in case of 
	 * @var string
	 * @api
	protected $errorMethodName = 'errorAction';

So you can overload it with your custom implementation.


Dne 25. 3. 2015 v 19:34 Jan Kornblum napsal(a):
> Dear newsgroup,
> a controllers newAction() renders a form. This form will be submitted
> using ajax.
> Without having any validation errors, the controllers createAction()
> returns a json_encode($status). So far all fine.
> But when the form is submitted and there *are* validation errors,
> extbase calls the newAction() again and there is no possibility to just
> get a json_encoded($status) returned (As the *first* call to newAction()
> *should* return the form-markup).
> I just want to get the validation errors returned when the newAction()
> is beeing called after a failed createAction().
> Is there any possibility to do so?
> Kind regards, Jan

More information about the TYPO3-english mailing list