0

I can find the comments template at modules/comments/comment.tpl.php

But where is the comment Form Template please?

I want to add a users image next to the form

Thanks for your help

Charles

1
0

It is in the default comment module , and editing the core options is not a good practice at all.

You can alter the comment form in your active theme template.php or hook_form_alter() function in your custom module

<?php 
function THEMENAME_form_comment_form_alter(&$form, &$form_state) {
        //dpm($form); //shows original $form array 
        //$form['author']['#type'] = 'fieldset'; 
       // $form['author']['#title'] = 'Your Information'; 
       // $form['author']['#collapsible'] = FALSE; 
      //  $form['your_comment'] = array( '#type' => 'fieldset', '#title' => t('Your Comment'), '#collapsible' => FALSE, '#weight' => 2, ); 
        //Subject 
       // $form['your_comment']['subject'] = $form['subject']; 
       // unset($form['subject']); 
     //   $form['your_comment']['subject']['#weight'] = -10; 
        //Comment 
        $form['your_comment']['comment_body']['#prefix'] = "<div>User picture</div>" ;
        $form['your_comment']['comment_body'] = $form['comment_body']; 


}
?>

You can add user picture using prefix/suffix in the comment form. Try if it work for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.