Hello,
I have following db structure:
CREATE TABLE `Category` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `ParentID` int(11) NOT NULL, `Name` varchar(30) NOT NULL, PRIMARY KEY (`ID`) ) CREATE TABLE `Post` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Title` varchar(30) NOT NULL, `Content` text NOT NULL, PRIMARY KEY (`ID`) ) CREATE TABLE `PostCategory` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `PostID` int(11) NOT NULL, `CategoryID` int(11) NOT NULL, PRIMARY KEY (`ID`) )
And I use this in my controller:
$crud->set_relation_n_n('Category', 'PostCategory', 'Category', 'PostID', 'CategoryID', 'Name');
Everything is working fine, but I don't like the way multiselect field displays categories, so I want to create checkbox tree with parent and child categories (something like this: http://css-tricks.com/examples/IndeterminateCheckboxes/ ).
So the question is, what would be the best way to create such custom field and how to make it work with grocery crud?
Thanks!