Display form sections depending on query results

I would like to create a form that renders a different number of sections based on database query results. I am trying to create a method display a directory tree type "thing" to allow users to navigate through a series of objects to the lowest level entity. Any help or recommendations would be greatly appreciated....

OriginalPostID-86067

OriginalPostID-86067

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data