开发者

change drupal comment

I want to put the comment textarea which is used to enter the comment text above the three fields (name, email, homepage). The fina开发者_JAVA百科l 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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜