You are here

function remember_me_insert_checkbox in Remember me 5.2

Try to insert 'Remember me' checkbox between 'Username', 'Password' and 'Log in' form elements.

1 call to remember_me_insert_checkbox()
remember_me_form_alter in ./remember_me.module
Implementation of hook_form_alter().

File

./remember_me.inc, line 51
Functions that are not needed at all times can be included when required.

Code

function remember_me_insert_checkbox(&$form) {
  $form1['remember_me'] = array(
    '#title' => t('Remember me'),
    '#type' => 'checkbox',
    '#default_value' => variable_get('remember_me_checkbox', 0),
  );
  _remember_me_array_insert_after_key('pass', $form, $form1);
  $form['name']['#attributes']['tabindex'] = '1';
  $form['pass']['#attributes']['tabindex'] = '2';
  $form['remember_me']['#attributes']['tabindex'] = '3';
  $form['submit']['#attributes']['tabindex'] = '4';
}