Programmatically enable Mollom protection for a form I want to enable Mollom protection for a number of forms in my development environment, and then export that configuration to QA and to Production without touching the Admin interface in QA or production.

I can export the Mollom settings via Features + Strongarm, but it doesn't appear to export the configuration for forms protected by Mollom.

I see that I can use hook_mollom_form_list and hook_mollom_form_info to make new forms available in the UI with default values, but I can't get hook_mollom_form_info to fire without enabling protection for the form in the UI.

I am trying to add a captcha to the registration form and password reset form, do text analysis on comments, and do text analysis for my custom node submit form. It appears that the mollom module already has definitions for all of these forms, but I don't see any way to enable them.
I didn't find a better way, so I did inserts directly into the DB.

In mymodule.install:

function mymodule_update_70001() {
  # CAPTCHA on registration form
  db_insert('mollom_form')
    -&gt;fields(array(
      'form_id' =&gt; 'user_register_form',
      'mode' =&gt; 1,
      'checks' =&gt; 'a:0:{}',
      'discard' =&gt; 1,
      'enabled_fields' =&gt; 'a:0:{}',
      'strictness' =&gt; 'normal',
      'module' =&gt; 'user',
    ))
    -&gt;execute();


  # CAPTCHA on password reset form
  db_insert('mollom_form')
    -&gt;fields(array(
      'form_id' =&gt; 'user_pass',
      'mode' =&gt; 1,
      'checks' =&gt; 'a:0:{}',
      'discard' =&gt; 1,
      'enabled_fields' =&gt; 'a:0:{}',
      'strictness' =&gt; 'normal',
      'module' =&gt; 'user',
    ))
    -&gt;execute();

  # Text analysis of comments
  $response = db_insert('mollom_form')
    -&gt;fields(array(
      'form_id' =&gt; 'comment_node_mynode_form',
      'mode' =&gt; 2,
      'checks' =&gt; 'a:2:{i:0;s:4:"spam";i:1;s:9:"profanity";}',
      'discard' =&gt; 0,
      'enabled_fields' =&gt; 'a:2:{i:0;s:7:"subject";i:1;s:27:"comment_body][und][0][value";}',
      'strictness' =&gt; 'normal',
      'module' =&gt; 'comment',
    ))
    -&gt;execute();

  # Text analysis of submission
  $response = db_insert('mollom_form')
    -&gt;fields(array(
      'form_id' =&gt; 'mynode_node_form',
      'mode' =&gt; 2,
      'checks' =&gt; 'a:2:{i:0;s:4:"spam";i:1;s:9:"profanity";}',
      'discard' =&gt; 0,
      'enabled_fields' =&gt; 'a:4:{i:0;s:5:"title";i:1;s:19:"body][und][0][value";i:2;s:32:"field_projectpage][und][0][value";i:3;s:33:"field_downloadpage][und][0][value";}',
      'strictness' =&gt; 'normal',
      'module' =&gt; 'node',
    ))
    -&gt;execute();
}