Form validation errors not passed to view

Permalink
Hi,

I have a form in my 5.7.5.9 application which has some mandatory fields. When submitting the form with a required empty field the form controller sets the $errors and $formResponse variable but those aren't passed to the view.php in the form block.

I have overridden the /forms/controller.php in my application/blocks/ because I don't want any responses to be saved to the database. So I've just uncommented some insert specific lines. No other modifications were done.

application/blocks/form/controller.php
$this->set('formResponse', t('Please correct the following errors:'));
$this->set('errors', $errors);
$this->set('errorDetails', $errorDetails);


errors and errorDetails are properly set, can be tested via var_dump and die.

concrete/blocks/form/view.php
$errorHeader = isset($formResponse) ? $formResponse : null;
$errors = isset($errors) && is_array($errors) ? $errors : array();


$errorHeader is set to null and $errors is set to an empty array.

This is driving me insane. What am I missing?

Thank you for any advice.

mckoenig
 
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Try copying
concrete/blocks/form/view.php
to
application/blocks/form/view.php
and modify the namespace accordingly..