How can i use my dhtmlxtree with checkboxes enabled with html form? I’ve tried to do a research on it but failed to find a working solution.
Hello
How exactly do you want to use it? Could you explain in detailed?
Structure sample will be useful.
I want to implement DHTMLXtree to my form in a way that user can use a tree to select their desired selection from a tree that was initialized from HTML list.
Here’s my code…something like this,
<ul>
<li>JAPAN
<ul>
<li>TOKYO
<ul>
<li>TOKYO COFFE SHOP</li>
</ul>
<li>TOKYO 2</li>
<li>TOKYO 3</li>
</ul>
</li>
</ul>
Plus, i used threestatecheckboxes…so i need to submit the data to the server like form data. Means if i choose TOKYO COFFEE SHOP, i need to submit value JAPAN, TOKYO and TOKYO COFFEE SHOP.
You can inspect the next samle:
dhtmlx.com/docs/products/dhtmlxT … _html.html
Div is the parent tag there. You can add there any properties for init (and for xmp structure)
Sorry…i can’t see how that sample related to what i’m trying to achieve here.
Hello,
you can put to attributed into tree tag enableCheckboxes=“true” andenableThreeStateCheckboxes=“true” to enable 3-state checkboxes:
[code]<div id=“treeboxbox_tree” setImagePath="…/…/codebase/imgs/dhxtree_skyblue/" enableCheckboxes=“true” enableThreeStateCheckboxes=“true” …>
-
...[/code]
And here is the post about saving checked items via html form:
viewtopic.php?f=3&t=176&p=34497#p34497
i managed to have the tree with three state checkbox, and get the data from the tree.
The problem now is, each level of my tree have different id’s.
JAPAN under the id _country, TOKYO under the id _city and the TOKYO COFFEE SHOP under the id _shop…and each of their id was defined in
- tag…not
- …and IF i define each of these id within the
- tag…the tree will be broken. I see the getAllChecked() method retrieved id’s from
- in which defined in dhtmlxtree.js file (with auto generated ID 1,2,3,4,5…), not in the index.html file i guess. How can i defined these id’s specifically? To get that specific value with specific id’s?