Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
By mijo1886 on
Hello
I'm creating a custom module and I want to use the Taxonomy Term Reference Tree Widget in a drupal_get_from page. How can I use this?
My idea is following code:
$form['mymodule_customfield'] = array(
'#type' => 'checkbox_tree',
'#title' => t('Custom title'),
'#vocabulary' => 2,
'#max_choices' => -1,
...
);
Best regards
mijo
Comments
I also need this information.
I also need this information. Hope someone can help.
Thanks.
Would be good to know this.
It would still be good to know this.
Still no comments on this?
Still no update on this? How do I render a term reference tree field in my template page?
-- Pratip Ghosh
Here's how I did it
Inspired from here
Yhooo! Petrica..
Yhooo! Petrica..
Your code works ....
---
Kind regards,
Thank you,
Rakesh James
Not working
I see the taxonomy tree on my form. But when I post the form, I have no values in my _form_submit function.
Not working with Drupal 9
Hi,
Please help me to use in Drupal 9 programmatically in form API