Introduction
I created the following snippet recently for a project where the default fieldset title for the join organic groups was 'Groups' and change it to 'Join the following Networks on registration'.
Step 1 of 2
Copy the following snippet into a custom projectname_overrides.module and modify projectname
to suit.
If you don't already have a projectname_overrides.module setup for your project. See below for a simple module .info file you can use.
<?php
/**
* Overriding the og_register fieldset title on the user registration page
*/
function form_overrides_form_alter(&$form, &$form_state, $form_id) {
switch ($form_id) {
case 'user_register':
$form['og_register']['#title'] = 'Join the following Networks';
}
}
?>
Step 2 of 2
Enable the module and refresh the user registration page. You may need to clear cache prior to this.
projectname_overrides.info file
Here's a projectname_overrides.info file you can copy and use if you don't already have a custom projectname_overrides.module set up.
; $Id$
name = Custom Overrides
description = Custom overrides module
core = 6.x
Notes
- Tested by Dublin Drupaller june 2011 with drupal 6.x and pressflow
- Please add a child page to this handbook page if you find an improvement or more efficient way of doing this