Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can alter the comment form so that your guidelines are added to it. There are a handful of ways to alter forms in Drupal. You can do it in your theme's template.php file (which I prefer for simple changes) or in a custom module. <a href="http://www.lullabot.com/articles/modifying-forms-drupal-5-and-6" rel="nofollow">This article</a> describes both methods, in Drupal 5 and 6, however not for the form you're interested in. However, the method used is the same that leads to the solution below. This is how you can make the change via template.php:</p> <p>The following PHP code can be added to your theme's template.php file:</p> <pre><code>function YOURTHEME_theme() { return array( 'comment_form' =&gt; array( 'arguments' =&gt; array('form' =&gt; NULL), ), ); } function YOURTHEME_comment_form($form) { $output = ''; $output .= '&lt;div class="comment-help"&gt;' . t('Please write comments in correct grammatical English, otherwise they will not published.') . '&lt;/div&gt;'; $output .= drupal_render($form); return $output; } </code></pre> <p>Replace YOURTHEME with the name of your theme. If you already have a YOURTHEME_theme function you will need to add the 'comment_form' key to the array it is already returning. I doubt you do, but it's worth mentioning just in case.</p> <p><em>A note: you should not be editing any of the themes in /themes, but you should have made a new theme or copied and renamed any of those themes into /sites/default/themes or /sites/all/themes.</em></p> <p>The above code is based on code from <a href="http://drupal.org/node/15248#comment-1057444" rel="nofollow">this page</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload