Commit d0ed91f4 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Allow elements to specify "nolabel" and so not have a <label> added to

them.
parent 3af3e37e
......@@ -60,8 +60,14 @@ function form_renderer_table($builtelement, $rawelement) {
$result .= ">\n\t\t";
$result .= '<th>';
if (isset($rawelement['title']) && $rawelement['type'] != 'fieldset') {
$result .= '<label for="' . $rawelement['id'] . '">' . hsc($rawelement['title']) . '</label>';
if (isset($rawelement['title'])) {
if (!empty($rawelement['nolabel'])) {
// Don't bother with a lable for the element
$result .= hsc($rawelement['title']);
}
else {
$result .= '<label for="' . $rawelement['id'] . '">' . hsc($rawelement['title']) . '</label>';
}
}
$result .= "</th>\n\t\t<td>";
$result .= $builtelement;
......
Supports Markdown
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