How do I change the content text programmatically? I have enabled the anonymous comment setting. And its E-mail form appears as shown below.



Now, I want to change the text "The content of this field is kept private and will not be shown publicly." to "E-mail address will not be shown publicly."

How can I change this programmatically.

For information the HTML part I have copied through fire-bug which is as below.

&lt;div class="form-item form-type-textfield form-item-mail"&gt;
     &lt;label for="edit-mail"&gt;E-mail &lt;span class="form-required" title="This field is required."&gt;*&lt;/span&gt;&lt;/label&gt;
     &lt;input id="edit-mail" name="mail" value="" size="30" maxlength="64" class="form-text required" type="text"&gt;
     &lt;div class="description"&gt;The content of this field is kept private and will not be shown publicly.&lt;/div&gt;
&lt;/div&gt;
This value is defined in the comment_form function. More specifically, it is the description in this section:

  // Add author e-mail and homepage fields depending on the current user.
  $form['author']['mail'] = array(
    '#type' =&gt; 'textfield',
    '#title' =&gt; t('E-mail'),
    '#default_value' =&gt; $comment-&gt;mail,
    '#required' =&gt; (!$user-&gt;uid &amp;&amp; $anonymous_contact == COMMENT_ANONYMOUS_MUST_CONTACT),
    '#maxlength' =&gt; 64,
    '#size' =&gt; 30,
    '#description' =&gt; t('The content of this field is kept private and will not be shown publicly.'),
    '#access' =&gt; $is_admin || (!$user-&gt;uid &amp;&amp; $anonymous_contact != COMMENT_ANONYMOUS_MAYNOT_CONTACT),
  );


You could create a custom module and implement hook_form_FORM_ID_alter. Your custom module file would contain below lines in a .module file and a basic .info file.

&lt;?php

function MODULENAME_form_comment_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  $form['author']['mail']['#description'] = t('E-mail address will not be shown publicly.');
}


Alternatively there are some options for overriding strings outlined here: Drupal 6 &amp; 7 - Change default strings (text) without using full translation system