change drupal comment

732 views Asked by At

I want to put the comment textarea which is used to enter the comment text above the three fields (name, email, homepage). The final result should be as shown below:

 the comment text area

name:      email:     homepage:     submitcomment

how I position the fields like this? Thank you.

the version is drupal 6.20. i mean the form to create a comment.

1

There are 1 answers

2
jpstrikesback On BEST ANSWER

To modify the comment form the way you want to you're probably going to want to use a hook_form_alter() to modify the formfield weights. You can theme it with by providing a preprocess function (see: http://systemseed.com/blog/how-customise-comment-form-drupal-6) but to rearrange the formfield weights I think you'll need to use hook_form_alter() in a little custom module.

Something like this:

in MY_MODULE.module

/**  
 * Implementation of hook_form_alter().  
 */  

function MY_MODULE_form_alter(&$form, &$form_state, $form_id){
  if ($form_id == 'comment_form'){
    $form['comment_filter']['#weight'] => -10
    );
  }
}

Other than that you could resort to something simpler with jQuery to just rearrange divs on page load