Hello,

I don't know where I am doing wrong in here. I tried finding it by the problem which was solved with the same reason but those also not useful.

Here is my .module file code -

<?php

//hook_permission().
function signup_event_permission(){
  return array(
    'administer signup event' => array(
      'title' => t('Administer Signup Event'),
      'description' => t('Warning: Give to trusted roles only.'),
    ),
    'register event' => array(
      'title' => t('Register Event'),
      'description' => t('Register for the event.'),
    ),
    'cancel signup' => array(
      'title' => t('Cancel Signup'),
      'description' => t('Cancel registration for the event.'),
    ),
  ); 
}

//hook_menu().
function signup_event_menu(){
  $items = array();
  $items['signup/%d'] = array(
    'title' =>  t('Signup For Event'),
    'page callback' =>  'event_register',
    'access callback' => 'user_access',
    'access arguments' =>  array('Register Event'),
    'file'  =>  'event_register.inc',
    'type'  =>  MENU_CALLBACK,
  );
  $items['admin/config/signupevent']  = array(
    'title' =>  t('Confiigure Signup Event'),
    'description' => t('Allow administering the settings for Signup Event for Content types.'),
    'page callback' => 'drupal_get_form',
    'page argument' => array('signup_event_admin_setting'),
    'access callback' => TRUE,
    'access arguments' =>  array('Administer Signup Event'),
    'file'  =>  'signup_event_settings.inc',
  );
  $items['admin/config/signupevent/manage']  = array(
    'title' =>  t('Manage Signup Event'),
    'description' => t('Manage Signup Event for Content types.'),
    'page callback' => 'drupal_get_form',
    'page argument' => array('signup_event_admin_setting'),
    'access callback' => TRUE,
    'access arguments' =>  array('Administer Signup Event'),
    'file'  =>  'signup_event_settings.inc',
    'weight'  => -10,
  );
  return $items;
}

My signup_event_settings.inc file code -

<?php

//Admin setting form
function signup_event_admin_settings(){
  $form = array();
  $form['content_type'] = array(
    '#title'  => t('Content Types'),
    '#description'  => t('Select a content type where signup for event should appear.'),
    '#type' => 'select',
    '#options'  => array(
      0 =>  t('Page'),
      1 =>  t('Article'),
    ),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value'  => t('Save'),
  );
  return $form;
}

This is what the error I am getting when I am trying to navigate to my given path -

Warning: Missing argument 1 for drupal_get_form() in drupal_get_form() (line 123 of /var/www/module_dev/includes/form.inc).
Notice: Undefined variable: form_id in drupal_get_form() (line 131 of /var/www/module_dev/includes/form.inc).
Notice: Undefined index: in drupal_retrieve_form() (line 763 of /var/www/module_dev/includes/form.inc).
Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in drupal_retrieve_form() (line 798 of /var/www/module_dev/includes/form.inc).

I would appreciate any quick help..

Thanks,

Comments

You do not say which path you

You do not say which path you are trying, there are three and the first not define the page arguments.

The callback you do show is missing the expected arguments of $form and &$form_state so it should be declared as signup_event_admin_settings($form, &$form_state)

Thanks for your quick

Thanks for your quick response.

I solved it. There were spelling mistake at one place and that was creating this error. I got the form called with $form_state, so my question is - Is this important ?

Thanks,

RajeevK,
+91-9650361380
http://drupalconnect.in/