0
votes

I have enabled a form under modules but accessing the page gives "page not found" error.

sites/default/modules/awesome_form/awesome_form.module

function awesome_form_menu(){
 $items['my-new-form'] = array(
    'title' => 'simple form',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'drupal_get_form',
    'page arguments' => array('show_form_callback'),
    'access arguments' => array('access content'),
    'file' => 'application_file.inc'
  );
  return $items;
}

sites/default/modules/awesome_form/application_file.inc

function show_form_callback($form, &$form_state){
  $form['test_input'] = array(
    '#type' => 'textfield',
    '#required' => TRUE,
    '#title' => 'Name'
  );
  return $form;
}

sites/default/modules/awesome_form/awesome_form.info

name = Awesome Form
description = Some Test Form
core = 7.x

and when I browse to mysite.com/my-new-form I get "page not found" error. I also have enabled the module "Awesome Form" under modules. Yet same issue.

A cutom module in sites/default/modules? Shouldn't it be in sites/all/modules instead?Romain Valeri
no it should not. and that is not the issue to the problemKal