开发者

Themeing Node/Add form - Taxonomy Field

开发者 https://www.devze.com 2022-12-17 06:07 出处:网络
I am theming a custom tpl.php file to style my forms. I am printing my fields with something like this:

I am theming a custom tpl.php file to style my forms.

I am printing my fields with something like this:

print drupal_render($form['field_sr_minutes'])

The problem is that on one element I开发者_C百科 need to get in this form is a taxonomy field, which is what i'm having a problem with. It will display with drupal_render($form), but I want to put it in a specific place, similarly to how I'm doing it with the normal node fields.

However, what I'm trying won't work:

Shows in HTML source as name="taxonomy[6]"

So, I'm trying things like

 print drupal_render($form['taxonomy[6]'])
 print drupal_render($form['taxonomy_6'])
 print drupal_render($form['name_of_taxonomy'])

But, no go...

Any Ideas???


Taxonomy fields are all present under the name taxonomy in the node form. So you can just print that.

0

精彩评论

暂无评论...
验证码 换一张
取 消