Why do I get these errors in my module? I am trying to use the Date module in a module I am writing, but I get the following errors:


  Warning: Missing argument 1 for myform_data_entry_form() in myform_data_entry_form() (line 28 of D:\wamp\www\drupal\sites\all\modules\myform\myform.module).
  Warning: Missing argument 2 for myform_data_entry_form() in myform_data_entry_form() (line 28 of D:\wamp\www\drupal\sites\all\modules\myform\myform.module).


This is the code I am using in my module.

function myform_help($path, $arg) {
switch ($path) {
      case "admin/help#myform":
        return '&lt;p&gt;'.  t("Displays links to nodes created on this date") .'&lt;/p&gt;';
        break;
    } 
 }

function myform_menu() {
  $items['myform/data_entry_form'] = array(
    'type' =&gt; MENU_CALLBACK,
    'access arguments' =&gt; array('access content'),
    'page callback' =&gt; 'myform_data_entry_form' 
  );
  return $items;
}


function myform_permission(){
  return array(
    'access myform content' =&gt; array(
      'title' =&gt; t('Access content for the myform module')
    ) 
  );
}

function myform_data_entry_form($form,&amp;$form_submit) {
  $form['curdate'] = array('#type' =&gt; 'date_popup', '#title' =&gt; 'Date', '#date_format' =&gt; 'd/m/Y');

  return $form;
}
Drupal forms should be called using the drupal_get_form() method, even from menu callbacks. Your menu item needs to look like this:

$items['myform/data_entry_form'] = array(
  'type' =&gt; MENU_CALLBACK,
  'access arguments' =&gt; array('access content'),
  'page callback' =&gt; 'drupal_get_form',
  'page arguments' =&gt; array('myform_data_entry_form') 
);

return $items;


Make sure you clear Drupal's caches each time you make a change in hook_menu(), otherwise it won't get picked up.