Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6217477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:26:01+00:00 2026-05-24T07:26:01+00:00

I have a drupal 7 site and want to customize the comment form to

  • 0

I have a drupal 7 site and want to customize the comment form to always be plain text (regardless of the user and whether they are authenticated). As the text format setting will be fixed, I want to remove the little blurb that appears at the bottom of the comment body.

In general, how do I go about customising the look and feel of the comment form?

UPDATE

As per Berdir’s instructions I added an #after_build function. I did this by adding a hook_form_comment_form_alter function to my template.php file. That new function and the custom function it calls are below:

function mytheme_form_comment_form_alter(&$form, &$form_state, &$form_id)
{ 
    $form['comment_body']['#after_build'][] = 'configure_comment_form';
    //$form['comment_body']['und']['#after_build'][] = 'configure_comment_form';
}

function configure_comment_form(&$form, &$param1, &$param2)
{
    var_dump($form);
}

Clearly I can tell that my configure_comment_form function is getting called as the var_dump gets printed out. I’ve tried adding the configure_comment_form to the #after_build at both the location in the $form array shown in the code. I get identical results for both, the comment body form field simply disappears.

I’ve not overwriting any existing after build functions. $form['comment_body']['#after_build'] does not exist when I add a function to it and $form['comment_body']['und']['#after_build'] looks as below after adding the custom function:

["#after_build"]=>
      array(2) {
        [0]=>
        string(30) "field_form_element_after_build"
        [1]=>
        string(22) "configure_comment_form"
      }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T07:26:01+00:00Added an answer on May 24, 2026 at 7:26 am

    To remove the filters box under the comment body you can use your theme’s template.php to implement the following hooks:

    function theme_filter_tips($variables) {
        return '';
    }
    function theme_filter_tips_more_info() {
        return '';
    }
    function theme_filter_guidelines($variables) {
        return '';
    }
    

    This just leaves the outline of the filter/tips box, and that can be taken care of in your theme’s CSS with:

    .filter-wrapper {
        display: none;
    }
    

    Although I am not sure if that will cause other functionality to break by hiding that class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Drupal site where I want to allow users to add their
i have a drupal site with many users. I want to add newsletter checkbox
i want to have another drupal-site in a subdirectory using multisites. Assuming I have
I have a non-Drupal site which authenticates with a simple MySQL user database. I
I have installed the fckeditor in my drupal site. Now I want to replace
i have a drupal site and i want to add to the RSS feed
I have a drupal site, and i want to redirecting visitors to a different
I have a drupal site with more than 100000 nodes and counting. I want
I have a drupal based site (CCK+Views+Taxonomy) with a huge amount of text content.
I have Drupal 5 site where a button is clicked and it calls a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.