Disable error messages

More
15 Aug 2014 10:38 - 19 Aug 2014 12:22 #1 by Demis [Fox-Labs]
Demis [Fox-Labs] created the topic: Disable error messages
By default, when some field contains invalid data the form displays a clear error message listing all the invalid fields in addition to highlight each invalid field with a red border.



How to hide the whole error area.

Please note that currently this method applies to the module version only and not to the component version.
  1. Make a copy of the file modules/mod_foxcontact/tmpl/default.php on the same directory, and call it as you prefer, for example "nomessages.php". Do not use space, upper-cases or punctuation on the file name.
  2. Edit the file that you've just created (modules/mod_foxcontact/tmpl/nomessages.php). There search for the line
    $messageboard->Display();
    and delete it.
  3. On Joomla backend, edit the module properties on "Extensions" > "Module Manager". Go to "Advanced" section. There change the property "Alternative Layout" from "default" which is currently selected to "nomessages".



This is how it should look like:



In the example, invalid fields have been further emphasized by applying an additional red background using css.
.control-group.error input { background-color: #ffd0d0; }

Caution: Error messages help people understand that some fields contain invalid data and the form has not been accepted. Removing them, you are relying only on the colors to provide such information. I speak from my personal experience, expect complaints from frustrated colorblind people who don't understand what's wrong with the form and why they are unable to submit.

Please Log in or Create an account to join the conversation.