Thank you but where and how would I use this code please?
Thanks
Roger
Using latest Drupal 7 fully updated.
I need to change the user login system.. Change the title of the Username to 'Question 1' and the Password title to 'Question 2' Is there a way to do this please. Maybe something like:
<?php /** * Implements hook_form_alter(). */ function deliver_form_alter(&$form, $form_state, $form_id) { if ($form_id == 'user_login' || $form_id == 'user_login_block') { // change the labels $form['name']['#title'] = t('My name label here'); $form['pass']['#title'] = t('My password label here'); } } ?>
In a custom module named deliver. If you want a different name for the module (e.g. FOO) just change deliver_form_alter to FOO_form_alter.
Earnie
On Sat, Oct 13, 2012 at 1:07 AM, Roger arelem@bigpond.com wrote:
Thank you but where and how would I use this code please?
Thanks
Roger
Using latest Drupal 7 fully updated.
I need to change the user login system.. Change the title of the Username to 'Question 1' and the Password title to 'Question 2' Is there a way to do this please. Maybe something like:
<?php /** * Implements hook_form_alter(). */ function deliver_form_alter(&$form, $form_state, $form_id) { if ($form_id == 'user_login' || $form_id == 'user_login_block') { // change the labels $form['name']['#title'] = t('My name label here'); $form['pass']['#title'] = t('My password label here'); } } ?>
-- [ Drupal support list | http://lists.drupal.org/ ]