Skip to content

Instantly share code, notes, and snippets.

@haroldSanchezb
Created May 2, 2014 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haroldSanchezb/0104bb826cb2748e1456 to your computer and use it in GitHub Desktop.
Save haroldSanchezb/0104bb826cb2748e1456 to your computer and use it in GitHub Desktop.
<?php
function mymodule_menu() {
$items = array();
$items['admin/config/services/mymodule'] = array(
'title' => 'title',
'description' => 'description',
'page callback' => 'drupal_get_form',
'page arguments' => array('mymodule_form'),
'access arguments' => array('administer users'),
'type' => MENU_NORMAL_ITEM,
);
return $items;
}
function mymodule_form($form, &$form_state) {
$form['form1'] = array(
'#type' => 'textfield',
'#title' => t('URL form'),
'#required' => TRUE,
'#default_value' => variable_get('form1'),
);
$form['form2'] = array(
'#type' => 'textfield',
'#title' => t('URL contraseña'),
'#required' => TRUE,
'#default_value' => variable_get('form2'),
);
return system_settings_form($form);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment