default_form_alter

Versions
6 – 7
default_form_alter(&$form, $form_state, $form_id)

Implementation of hook_form_alter().

Allows the profile to alter the site-configuration form. This is called through custom invocation, so $form_state is not populated.

Code

profiles/default/default.profile, line 145

<?php
function default_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'install_configure') {
    // Set default for site name field.
    $form['site_information']['site_name']['#default_value'] = $_SERVER['SERVER_NAME'];
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.