on the user registration form I have enable Profile and added a 'First Name' and 'Last Name' field. They are in the array under 'Personal Information'. I would like to have a deafult value of First Name in a light gray in the box rather than a label above, I read through 11heavens ad some other tutes and they talk about adding a terms and conditions but not how to modify the array vaulues for #default_value or maybe there is an easier way? here is what I am trying:

  /**
   * Theme override for user edit form.
   *
   * The function is named themename_formid.
   */
  function hglitigation_user_register_form($form) {
    // Our kickin' mods go here.
	 $output = '';
  // Print out the $form array to see all the elements we are working with.
  //$output .= dsm($form);
  // Once I know which part of the array I'm after we can change it.

  // You can use the normal Form API structure to change things, like so:
  // Change the Username field title to Login ID.
  $form['Personal Information'']['profile_first_name']['#default_value'] = t('First Name');

  // Make sure you call a drupal_render() on the entire $form to make sure you
  // still output all of the elements (particularly hidden ones needed
  // for the form to function properly.)
  $output .= drupal_render($form);
  return $output;
  }

Comments

kars-t’s picture

Status: Active » Fixed

Hi

I am closing this issue to clean up the issue queue. Feel free to reopen the issue if there is new information and the problem still resides. If not please make sure you close your issues that you don't need any more.

Maybe you can get support from the local user group. Please take a look at this list at groups.drupal.org.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.