Problem/Motivation
In certain cases we want to disable duplicate messages (on top - summary - and inline).
We currently have the #error_no_message
property which allowed us to disable errors messages for individual elements.
There may be some field that does not display the inline error, so the message is only visible in the summary. As an example, the Captcha field.
We should then keep the messages in the summary - even when the new property to disable the summary is requested - for fields that contain errors but can't display them inline (Eg. invisible elements, missing elements, ...).
Proposed resolution
Add a form property which can be used to disable IFE summary$form['#disable_inline_form_errors_summary'] = TRUE
.
Keep the message in the summary for fields which can't show inline-error (Eg. invisible elements, missing elements, ...).
Completed tasks
Write a patch.Update the patch as requested in #17 (numbered points). (Done by #20, #24, #26).Issue summary update requested in #17.Write tests. (Done by #20, #24).Write ainline_form_errors.api.php
where we can document how both of these works. See #17Write a patch for #3027318: Improve test coverage for Inline Form Errors Improve test coverage for Inline Form Errors
Remaining tasks
Once #3027318: Improve test coverage for Inline Form Errors merged, address issue #29- Review and commit.
User interface changes
- Developers will be able to remove the Summary message when IFE is enable.
- The summary should still be visible for an element which can't show inline-error (invisible element, missing element, ...).
API changes
The form element will have an optional #disable_inline_form_errors_summary boolean
, that if TRUE
, disables the duplicate messages from summary & inline-error elements. If one or more elements with errors can't show inline-error (Eg. invisible elements, missing elements, ...) , the summary will remain visible with those messages only.