Hello,
in order zu extend the form-fields provided on the sites-information page, i began to code a small module. The code below should do the trick, but after installation the checkbox does not appear on the sites-information page - what's wrong? What did i miss in the code?

function extended_siteinfo_hook_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'system_site_information_settings') {
    $form['extended_siteinfo_extra_setting'] = array(
      '#type' => 'checkbox',
      '#title' => t('Use my setting'),
      '#default_value' => variable_get('extended_siteinfo_extra_setting', TRUE),
    );
  }
}

Comments

nevets’s picture

I am guessing your module is called 'extended_siteinfo' in which case the function name should be extended_siteinfo_form_alter() [hook is replaced by the module name]

adam1’s picture

... that was the problem!