How do I add text "Fields with a * are required" to the comment form as well as which html tags are allowed?

I can't seem to add anything. For example if I turn on Garland it shows which HTML tags I can use, but as I turn on BlogBuzz they disappear.

Comments

Anonymous’s picture

Adding the text "Fields with a * are required", or something similar, can be done as follows:

In template.php in the main theme folder:


<?php
/**
* Implementation of HOOK_theme().
*/
function blogbuzz_theme(){
  return array(
    'comment_form' => array(
      'arguments' => array('form' => NULL),
    ),
  );
}

// show the * fields are required text
function blogbuzz_comment_form($form) {
  $output = t('<p>Form fields with a <span class="form-required">*</span> are required.</p>');
  $output .= drupal_render($form);
  return $output;

}
?>

With many thanks to:
How can I add code between the comments and the comment form?
Using hook_theme to modify Drupal forms

Anonymous’s picture

Status: Active » Closed (fixed)