I'm trying to add a disclaimer text line(s) to my Comments form. I want this to show to the site visitor at the top of the Comments form when they go to submit a comment. So for example at these URL locations:
/comment/reply/104#comment-form
This is what my comment form function looks like in my template.php file (in my theme folder):
// Comment form
function phptemplate_comment_form($form){
if (!empty($form['captcha'])) {
$form['captcha']['#attributes']['class'] = 'security';
//$form['captcha']['#title'] = '';
}
+ $output .= '
+ $output .= '
';
$output = drupal_render($form);
return $output;
}
The lines I added have a +.
However this is not returning the string "Comment Disclaimer Goes Here!" when I reload my comment form.
What am I doing wrong?
Thanks,
-backdrifting
Comments
_
In d6 you can simply copy the comment.tpl.php file from /modules/comment to your theme folder and edit however you like.
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
Comment form, not comment output ...
I think that template outputs the actual comments. I'm trying to add the disclaimer directly to the top of the comment form. I'd like it directly under or next to the "Reply" and before the Subject field.
Can you target these in the comment.tpl.php?
-backdrifting
sorry about that-- I didn't
sorry about that-- I didn't catch the 'form' part. You can theme a form the same way, but it's done a little differently and you have to explicitly tell the theme engine about the form template file. See Fine-tuning the UI by Theming Forms In Drupal 6.0 for an excellent example.
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz