public function WebformConditionals::reportErrors in Webform 7.4
Displays and error messages from the previously-generated sort order.
User's who can't fix the webform are shown a single, simplified message.
File
- includes/
webform.webformconditionals.inc, line 256 - Conditional engine to process dependencies within the webform's conditionals.
Class
- WebformConditionals
- Performs analysis and topological sorting on the conditionals.
Code
public function reportErrors() {
$this
->getOrder();
if ($this->errors) {
if (webform_node_update_access($this->node)) {
foreach ($this->errors as $page_num => $page_errors) {
drupal_set_message(format_plural(count($page_errors), 'Conditional error on page @num:', 'Conditional errors on page @num:', array(
'@num' => $page_num,
)) . '<br /><ul><li>' . implode('</li><li>', $page_errors) . '</li></ul>', 'warning');
}
}
else {
drupal_set_message(t('This form is improperly configured. Contact the administrator.'), 'warning');
}
}
}