How to create admin settings form in Drupal?

<?php
function common_menu() { 
   
$items = array();
    
$items['admin/baseurlsetting'] = array(
   
'title' => 'Base URL',
       
'page callback' => 'drupal_get_form',
   
'page arguments' => array('baseurl_admin_settings'),
   
'access arguments' => array('access content'),
   
'type' => MENU_NORMAL_ITEM,
  );
return
$items;   
}

function
baseurl_admin_settings() {
 
$form = array();
 
$form["config_init"]["akamai_url"] = array(
 
"#type" => "textfield",
 
"#size" => 30,
 
"#title" => t("Akamaiurl"),
 
"#description" => t('Base URL').'),
    "#default_value" => variable_get('
base_url', '),
   
"#required" => true,
);   
   
  return
system_settings_form($form);
}   
?>

Share Your Answers

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.