Hi,
Trying to create a custom guest-login page for my site. But for some reason, the validate function was never called. (I placed a drupal_set_message statement to verify at the beginning of function). When submit button clicked, no message displayed even I did not enter anything for the input name value.
I don't care if the submit actually works or not, at this point, the validate function just not gets called.
Please help.
<?php
require_once DRUPAL_ROOT . '/' . variable_get('common_inc', 'includes/common.inc');
/**
* @file
* Custom sign in form
*/
/**
* Implements hook_menu() to set up the URLs (menu entries) for the
* forms.
*/
function ad_guestlogin_menu() {
$items = array();
$items['guest-login'] = array(
'title' => 'Sign In',
'page callback' => 'drupal_get_form',
'page arguments' => array('ad_guestlogin_form'),
'access callback' => TRUE,
'description' => 'Sign In',
'type' => MENU_NORMAL_ITEM,
);
return $items;
}
//////////////// Sign In Form //////////////////////
/**
* This form is used to replace the user login form
*
* @file
* function ad_guestlogin_form($node, &$form_state)
* This function is called the "form constructor function". It builds the form.
* It takes a two arguments, $form and $form_state, but if drupal_get_form()