2 replies [Last post]
littly_kitty's picture
Offline
Bug Finder
Joined: 01/20/2008
Juice: 155
Was this information Helpful?

I am trying to theme my ubercart forms to make them more user friendly.

I am doing this by using template.php.

I have been able to modify most of the form elements apart from the page title field. I want to re-name it, but it doesn't seem to accept any modifications.

This is the code I am using - is it the correct way of doing it?

// we register the form to the theme registry
function swb_theme(){
  return array(
    'photo_product_node_form' => array(
      'arguments' => array('form' => NULL),
     'template' => 'photo_product_node_form',
    ),
  );
}

// Photo Order
function swb_preprocess_photo_product_node_form(&$vars) {
$vars['form']['title']['#title] = Photo Name;
$vars['form']['title']['#description'] = 'Enter the photo name';

}

posco's picture
Offline
Joined: 07/12/2008
Juice: 38
Re: Theming Ubercart Fields

Just reading your code I found some syntax errors:

$vars['form']['title']['#title] = Photo Name;

Should be:

$vars['form']['title']['#title'] = 'Photo Name';

Notice the extra quote marks.

littly_kitty's picture
Offline
Bug Finder
Joined: 01/20/2008
Juice: 155
Re: Re: Theming Ubercart Fields

I try it with and without the quote marks, but no joy!
Any pointers?