Custom data forms in CakePHP
- by Affian
I'm building a controller to manage group based ACL in CakePHP and when I create or edit a group I want to be able to select what permissions it has. The group data table only stores a group ID and a group Name as the permissions are stored in the ACO/ARO table.
I have an array from the ACO that I want to turn into a set of checkboxes so you can check them to allow access from that group to that ACO. So first off, how do I turn this array into a set of checkboxes. The array looks like this:
array(
[0] => array(
[Aco] => array(
[alias] => 'alias'
[id] => 1)
[children] => array (
[0] => array(
[Aco]=>
...etc
))
[1] => array(
...etc
)
My next question is how can I check these once the form has been submitted to the controller to allow the selected actions?
[Update]
Ok changing the angle of my question, how can I use the Form helper to create forms that are not based on any Model?