PHPJavascript

Web Development Guide – My Personal Library of Tutorials and Scripts

Drupal Form Theme CCK

August1

check out http://drupal.org/node/601646 the best summarized description of how to theme drupal forms.

and also go through this slide presentation describing the overall drupal forms architecture and workflow.

Now I had created a Content type to add fields at the user registration form. And when I was trying to theme the form using the above solution I was not able to do so, the solution to that is the following:

In the template.php file user the form_id as user_register like this:

function dmcdubai_theme($existing, $type, $theme, $path) {
 return array(
 'profile_node_form' => array(
 'arguments' => array('form' => NULL),
 'template' => 'node-profile-edit'
 ),
 'user_register' => array(
 'arguments' => array('form' => NULL),
 'template' => 'node-profile-edit'
 )
 );
}

To know more on the subject visit http://www.phpjavascript.com/drupal-theme-form-cck-user-register/

posted under Drupal

Email will not be published

Website example

Your Comment:

 

13,816 spam comments
blocked by
Akismet