Commit 140133a7 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Improved the output when certain elements aren't available.

parent 7f759c14
......@@ -44,17 +44,17 @@ function form_renderer_div($builtelement, $rawelement) {
$result .= $builtelement;
// Contextual help
if (isset($rawelement['help'])) {
if (!empty($rawelement['help'])) {
$result .= ' <span class="help"><a href="#" title="' . hsc($rawelement['help']) . '">?</a></span>';
}
// Description - optional description of the element, or other note that should be visible
// on the form itself (without the user having to hover over contextual help
if (isset($rawelement['description'])) {
if (!empty($rawelement['description'])) {
$result .= '<div class="description"> ' . hsc($rawelement['description']) . "</div>";
}
if (isset($rawelement['error'])) {
if (!empty($rawelement['error'])) {
$result .= '<div class="errmsg">' . hsc($rawelement['error']) . '</div>';
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment