I'm writing a small module for learning purpose, where I try to create a module settings form using hook_menu() and form_api.
Everything look good in my code but I still getting this error message :
Warning: require_once(/var/www/html/drupal/modules/system/demo_usernames_form.inc): failed to open stream: No such file or directory in menu_execute_active_handler() (line 515 of /var/www/html/drupal/includes/menu.inc). Warning: require_once(/var/www/html/drupal/modules/system/demo_usernames_form.inc): failed to open stream: No such file or directory in menu_execute_active_handler() (line 515 of /var/www/html/drupal/includes/menu.inc).
function demo_menu(){
$items[]=array();
$items['admin/config/people/usernames']=array(
'title'=>'bad usernames list',
'description'=>t('configure not allowed usernames'),
'page_callback'=>'drupal_get_form',
'page arguments'=>array('demo_usernames_form'),
'access arguments'=>array('administer site configuration'),
'file'=>'demo_usernames_form.inc',
);
return $items;
function demo_usernames_form($form,&$form_state){
$form['bad_usernames']=array(
'#type'=>'textfield',
'#title'=>'Bad usernames',
'#default_value'=>variable_get('bad_usernames'),
'#description'=>t('Enter a list of "bad usernames" separated by commas. If a user tries to enter one of these usernames either on account creation or when editing their account, the form will display an error message.'),
);
return(system_settings_form($form));
}