Form errors / validation not working when using custom theme
Permalink 1 user found helpful
So I've added the following code to the page
/application/config/app.php
And it's working, in so far as now my login page and register page look all nice like my theme. However if someone enters the incorrect information or misses a required field the validation messages aren't showing. The page just reloads and no error messages are shown.
I'm wondering if I need to change the path to the form validation but I don't know how or where. Can anyone help?
Thanks
/application/config/app.php
And it's working, in so far as now my login page and register page look all nice like my theme. However if someone enters the incorrect information or misses a required field the validation messages aren't showing. The page just reloads and no error messages are shown.
I'm wondering if I need to change the path to the form validation but I don't know how or where. Can anyone help?
Thanks

In the view.php in your theme, do you have this line (this is from 5.8.1 but other versions should be similar)?
Wow thank you so much :-)
One line and it worked perfectly.
Thanks!
One line and it worked perfectly.
Thanks!
I'm having the same problem with version 5.7.5.9. After submitting a form with invalid data the page just reloads. I can verify the controller is picking up on the fields and filling an error variable but I can't get it to display in my theme. I've added the View element like so:
but that didn't help.
<div class="main_content"> <?php $a = new Area('Content'); $a->display($c); ?> <?php View::element( 'system_errors', array( 'format' => 'block', 'error' => isset($error) ? $error : null, 'success' => isset($success) ? $success : null, 'message' => isset($message) ? $message : null, ) );
Viewing 15 lines of 18 lines. View entire code block.
but that didn't help.
I can confirm that the variables $formResponse and $errors are not passed to the view.php in the /forms/ block. Is there any step inside the theme setup responsible for passing those correctly?