Hi!

I created a template for a type of content and I have a taxonomy with hierarchical_select module, the problem is that the module doesn't work correctly when I put it into the template.

In my template I have the following:

print_r(drupal_render($form['taxonomy'][4]));

When I select an option doesn't apperar the next terms and the list is empty. I dont know if I should to add extra code to the template or what happens.

The strange is that I have my project in a apache server and this seems to works well, but If I run my project in a lighttpd server appear the problem I dont know if this is the cause of problem or maybe a bug, but if anyone could help me I'II appreciated too much.

Comments

wim leers’s picture

Priority: Critical » Minor

You should not have to call drupal_render() in your template. You created this $form outside of the Forms API system, in your .tpl.php file? If yes, that won't work.
Also, version 2 is no longer supported.

wim leers’s picture

Assigned: Unassigned » wim leers
Status: Active » Postponed (maintainer needs more info)
saron’s picture

Hi !

I dont understand you very well, I created the template using the tutorials for theaming a cck input forms and I used "print drupal_render" for all fields, but I resolved the problem adding this line to my template, (I think that is resolved because now the hierarchichal_select is working),

This is the line that I added into my template in the last line:

print form_render($form);

What do you think, is correct the way that I created the template, this wouldn't cause me more problems in the future?

wim leers’s picture

Status: Postponed (maintainer needs more info) » Fixed

That should work indeed. I didn't think of that immediately.

However, it's *always* BADDDDDD to have logic in your theme, in this case a form. You're warned ;) :)

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

pan0s’s picture

yeah but what about in D5 where ' print form_render($form); ' doesnt apply?