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

rkerr’s picture

Status: Active » Closed (works as designed)

Just being consistent with the original Mollio templates.