myiyk/checkboxtree

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

easy checkboxtree

v1.0.1 2018-03-26 18:47 UTC

This package is not auto-updated.

Last update: 2021-07-24 12:47:25 UTC


README

Form Component for Nette framework

##Application

Register to form: app/bootstrap.php

\krejcon3\CheckboxTree::register();

##Using

$form->addCheckboxTree(
    "cbtree",
    "CheckboxTree",
    array(
        1 => "item1",
        2 => "item2",
        3 => "item3",
        "noid1" => array(
            4 => "item4",
            5 => "item5",
        ),
        6 => "item6"
    )
);

input is multidimensional array
output si simple array of keys (ids),
id by the next level (noid1 in example) may be anything you want...