Change Input Field Value using Hook Form Alter (User Login Block) How would I go about changing the input field value from e.g. 15 to 10 in the default User Login Block for Username and Password fields, using Hook Form Alter?
Put this in your module:

function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'user_login_block') {
    $form['name']['#size'] = 10;
    $form['pass']['#size'] = 10;
  }
}


Also hook_form_user_login_block_alter can be used, then you don't need to check the form_id.

Remember to clear the cache, if you are not already using hook_form_alter.