Hi,
I am trying to customize default login process, and i am using following code:
case 'user-login-form':
$form['name']['#title'] = t('User Code');
$form['name']['#description'] = t('Enter your user name or e-mail address.');
$form['pass']['#description'] = t('Enter the password that accompanies your e-mail.');
$form['name']['#element_validate'][] = 'mymodule_user_login_validate';
$form['#submit'][] = 'mymodule_user';
break;
case 'user_login_block':
$form['name']['#title'] = t('E-mail');
$form['name']['#element_validate'][] = 'mymodule_user_login_validate';
$form['#submit'][] = 'mymodule_user';
break;
The issue is that $form['#submit'][] is not working for user_login_block, if i try to put:
$form['#action']='user';
It redirects to login form, which i don't want.
Please suggest me a solution for this!
Thanks,
Kul.
Comments
Is the control not going to
Is the control not going to mymodule_user ($form['#submit'][])
No, control doesn't go there!
No, control doesn't go there!
let me try , get back to u
let me try , get back to u
yes, please suggest, and one
yes, please suggest, and one more thing user login form doesn't display forgot your password option, how can i enable it on user login form?
r u using the default login,
r u using the default login, if so it wont show the forgot password as link , it will show as separate tab in login form.
you can create a separate tpl for this
http://drupal.org/node/19855
the above link provide you step by step process for customizing the login form