Closed (works as designed)
Project:
Mollio
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Jul 2006 at 01:03 UTC
Updated:
17 Jul 2006 at 18:22 UTC
Notice below, the "/label" and its if statement are moved before the line:
$output .= $value . "<br />\n";
This allows you to make the title disappear using style.css.
-------------
// custom form elements
function mollio_form_element($title, $value, $description = NULL, $id = NULL, $required = FALSE, $error = FALSE) {
$output = '';
$required = $required ? '<span class="req">*</span>' : '';
if ($title) {
if ($id) {
$output .= "<label for=\"$id\"><b>$required$title:</b>";
}
else {
$output .= "<label><b>$required$title:</b>";
}
}
if ($title) {
$output .= '</label>' . "\n";
}
$output .= $value . "<br />\n";
if ($description) {
$output .= "<div class=\"description\">$description</div>\n";
}
return $output;
}
Comments
Comment #1
rkerr commentedJust being consistent with the original Mollio templates.