Hey Guys, Im using Drupal v6 and made a form/content type using CCK.

I need to theme the actual form that gets filled out so that would be the url of node/add/myform.

So I created a template page called page-node-add-myform.tpl.php.

What I want to do is not use " print $content " and instead insert each field manually.

Ive tried the following in my page-node-add-myform.tpl.php but none of them seem to work.

print drupal_render($form['field_first_name']['0']['value']); 
print drupal_render($form['field_first_name']); 
print drupal_render($form['first_name']['0']['value']); 
print drupal_render($form['first_name']); 

Im also using the devel module but still cant seem to get results from dpm($vars). If I understand correctly, dpm($vars) or dpm($form) should output all the possible fields that I can use.

Your help and/or guidance is greatly appreciated.

Thanks!

JC

Comments

stevenc’s picture

You said you want to theme the form, but what does that mean to you?

There are usually two objectives: modifying the form or its elements (adding/changing/removing fields, adding options or default text, etc.) AND styling the form (colors, layout, etc.)

The specific objective will determine the best approach.

---------------------------------
Steven Wright

Slalom