Hi, I've tried to search for this solution on Google, but I had no luck.
How do I print taxonomy terms when they are nested using form API?
Can check form api :
might it helps.
Drupal is a registered trademark of Dries Buytaert.